Discussion:
What's a lot of connections?
(too old to reply)
Karim Nassar
2005-07-15 07:00:58 UTC
Permalink
I am working on a system that uses postgresql 7.4.2 (can't change that
until 8.1 goes stable). Just figured out that there are about 285,000
connections created over about 11 hours every day. That averages out to
about 7.2 connections per second.

Is that a lot? I've never seen that many.
--
Karim Nassar <***@acm.org>


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Jeffrey W. Baker
2005-07-15 07:14:42 UTC
Permalink
Post by Karim Nassar
I am working on a system that uses postgresql 7.4.2 (can't change that
until 8.1 goes stable). Just figured out that there are about 285,000
connections created over about 11 hours every day. That averages out to
about 7.2 connections per second.
Is that a lot? I've never seen that many.
I see about 8 million connections per full day. Connecting to postgres
is cheap.

-jwb

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org
Tom Lane
2005-07-15 14:16:16 UTC
Permalink
Post by Jeffrey W. Baker
Post by Karim Nassar
I am working on a system that uses postgresql 7.4.2 (can't change that
until 8.1 goes stable). Just figured out that there are about 285,000
connections created over about 11 hours every day. That averages out to
about 7.2 connections per second.
Is that a lot? I've never seen that many.
I see about 8 million connections per full day. Connecting to postgres
is cheap.
It's not *that* cheap. I think you'd get materially better performance
if you managed to pool your connections a bit. By the time a backend
has started, initialized itself, joined a database, and populated its
internal caches with enough catalog entries to get useful work done,
you've got a fair number of cycles invested in it. Dropping the backend
after only one or two queries is just not going to be efficient.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Loading...