From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeffrey W. Baker <jwbaker@acm.org>
Cc: karim.nassar@acm.org
Cc: pgsql-performance@postgresql.org
Subject: Re: What's a lot of connections?
Date: Fri, 15 Jul 2005 10:16:16 -0400
Message-ID: <11126.1121436976@sss.pgh.pa.us> (raw)
In-Reply-To: <1121411682.7733.0.camel@noodles>
References: <1121410859.4715.87.camel@localhost.localdomain>
<1121411682.7733.0.camel@noodles>
"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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, jwbaker@acm.org, karim.nassar@acm.org
Subject: Re: What's a lot of connections?
In-Reply-To: <11126.1121436976@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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