pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
What's a lot of connections?
3+ messages / 3 participants
[nested] [flat]

* What's a lot of connections?
@ 2005-07-15 07:00 Karim Nassar <karim.nassar@acm.org>
  2005-07-15 07:14 ` Re: What's a lot of connections? Jeffrey W. Baker <jwbaker@acm.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Karim Nassar @ 2005-07-15 07:00 UTC (permalink / raw)
  To: pgsql-performance

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 <karim.nassar@acm.org>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: What's a lot of connections?
  2005-07-15 07:00 What's a lot of connections? Karim Nassar <karim.nassar@acm.org>
@ 2005-07-15 07:14 ` Jeffrey W. Baker <jwbaker@acm.org>
  2005-07-15 14:16   ` Re: What's a lot of connections? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Jeffrey W. Baker @ 2005-07-15 07:14 UTC (permalink / raw)
  To: karim.nassar@acm.org; +Cc: pgsql-performance

On Fri, 2005-07-15 at 00:00 -0700, Karim Nassar wrote:
> 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: What's a lot of connections?
  2005-07-15 07:00 What's a lot of connections? Karim Nassar <karim.nassar@acm.org>
  2005-07-15 07:14 ` Re: What's a lot of connections? Jeffrey W. Baker <jwbaker@acm.org>
@ 2005-07-15 14:16   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2005-07-15 14:16 UTC (permalink / raw)
  To: Jeffrey W. Baker <jwbaker@acm.org>; +Cc: karim.nassar@acm.org; pgsql-performance

"Jeffrey W. Baker" <jwbaker@acm.org> writes:
> On Fri, 2005-07-15 at 00:00 -0700, Karim Nassar wrote:
>> 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-07-15 14:16 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-07-15 07:00 What's a lot of connections? Karim Nassar <karim.nassar@acm.org>
2005-07-15 07:14 ` Jeffrey W. Baker <jwbaker@acm.org>
2005-07-15 14:16   ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox