Re: high user cpu, massive SELECTs, no io waiting problem
От | Scott Marlowe |
---|---|
Тема | Re: high user cpu, massive SELECTs, no io waiting problem |
Дата | |
Msg-id | AANLkTinM9tWax8u_E-GPbTQZrJcTs1kKE6hAMoEKc73=@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: high user cpu, massive SELECTs, no io waiting problem (Ivan Voras <ivoras@freebsd.org>) |
Список | pgsql-performance |
On Tue, Feb 15, 2011 at 6:00 PM, Ivan Voras <ivoras@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
В списке pgsql-performance по дате отправления: