On Tue, Feb 15, 2011 at 6:00 PM, Ivan Voras <ivo...@freebsd.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 > usleep()). That setting is PER PROCESS so it might not help that much. http://www.php.net/manual/en/pgsql.configuration.php#ini.pgsql.max-links -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance