On Tue, Feb 15, 2011 at 6:00 PM, Ivan Voras <ivoras(at)freebsd(dot)org> wrote:
> There is an old problem (which I've encountered so I'm replying but it may
> or may not be in your case) in which PostgreSQL starts behaving badly even
> for SELECT queries if the number of simultaneous queries exceeds the number
> of logical CPUs.
Note that this is a problem for most RDBMS engines, not just
postgresql. The performance drop off isn't too bad, but the total
number of connections times even a doubling of response time results
in a slow server.
> To test this, I'd recommend setting up a utility like
> pgpool-II (http://pgpool.projects.postgresql.org/) in front of the database
> to try and limit the number of active connections to nearly 64 (maybe you
> can have good results with 80 or 100).
pgpool IS the answer for most of these issues.
> You might also experiment with pgsql.max_links setting of PHP but IIRC PHP
> will just refuse more connections than that instead of waiting for them (but
> maybe your application can spin-wait for them, possibly while also using
That setting is PER PROCESS so it might not help that much.
In response to
pgsql-performance by date
|Next:||From: Robert Haas||Date: 2011-02-16 02:41:24|
|Subject: Re: [PERFORM] pgbench to the MAXINT|
|Previous:||From: Ivan Voras||Date: 2011-02-16 01:00:22|
|Subject: Re: high user cpu, massive SELECTs, no io waiting problem|