From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | andy <andy(at)squeakycode(dot)net> |
Cc: | John R Pierce <pierce(at)hogranch(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Monitoring number of backends |
Date: | 2013-10-22 20:44:25 |
Message-ID: | 5516.1382474665@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
andy <andy(at)squeakycode(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2013-10-22 20:53:52 | Re: Monitoring number of backends |
Previous Message | andy | 2013-10-22 20:13:09 | Re: Monitoring number of backends |