Re: Monitoring number of backends - Mailing list pgsql-general

From Tom Lane
Subject Re: Monitoring number of backends
Date
Msg-id 5516.1382474665@sss.pgh.pa.us
Whole thread Raw
In response to Re: Monitoring number of backends  (andy <andy@squeakycode.net>)
Responses Re: Monitoring number of backends
List pgsql-general
andy <andy@squeakycode.net> writes:
> On 10/22/2013 2:18 PM, John R Pierce wrote:
>> that style of php programming, you're getting some HUGE overhead in
>> connect/disconnect per web page.    putting pg_bouncer in the middle
>> will make a HUGE improvement, possibly a second per page load on a busy
>> server.

> No, actually, I don't think my connect overhead is huge.  My apache and
> postgres are on the same box, and it connects using unix socket.

You're ignoring the fact that PG backends have a pretty considerable
startup transient.  By the time a backend has gotten its caches populated
enough to be efficient, it's expended a lot of cycles.  You might be
getting away with this approach under low load, but it will bite you in
painful places eventually.

            regards, tom lane


pgsql-general by date:

Previous
From: andy
Date:
Subject: Re: Monitoring number of backends
Next
From: John R Pierce
Date:
Subject: Re: Monitoring number of backends