Re: Monitoring number of backends

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: John R Pierce <pierce(at)hogranch(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Monitoring number of backends
Date: 2013-10-23 20:55:31
Message-ID: CAMkU=1wr4U=y-pYLe_twP5Rtq5K2UW2=EO+Y60z6CiCDTJuGVA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 22, 2013 at 12:18 PM, John R Pierce <pierce(at)hogranch(dot)com> wrote:

> On 10/22/2013 11:25 AM, andy wrote:
>
>> Hum.. I had not thought of that. My current setup uses 40 max
>> connections, and I don't think I've ever hit it. I use apache and php, and
>> my db connections are not persistent.
>>
>
> 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.
>

My recent experience with mediawiki is that php is such a slow beast anyway
(even with APC) that connection/disconnect overhead is likely not to be
significant. But it would still be a good idea for him to learn pgbouncer,
in case his php code is much faster than mediawiki's is, or he runs into
the spinlock contention inside postgresql that has been all the rage
lately. It just isn't the first place I would look anymore.

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2013-10-23 21:28:54 Re: Monitoring number of backends
Previous Message Jeff Janes 2013-10-23 20:34:55 Re: Monitoring number of backends