On 10/22/2013 12:59 PM, Stephen Frost wrote:
> Andy,
>
> * andy (andy@squeakycode.net) wrote:
>> My website is about to get a little more popular. I'm trying to add
>> in some measurements to determine an upper limit of how many
>> concurrent database connections I'm currently using.
>
> PG is really *much* happier if you have only one backend per CPU in your
> system. The way to get there is by using a connection pooler like
> pg_bouncer and configuring it based on how many CPUs you have.
>
> pg_bouncer can also provide stats for you.
>
> Thanks,
>
> Stephen
>
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.
If I did plugin pg_bouncer, is it worth switching my php from pg_connect
to pg_pconnect?
I'd bet plugging in pg_bouncer now while I'm not too busy would help me
grow in the long run, huh? I like the sound of that. Thanks!
-Andy