Re: Postgres DB crashing

John R Pierce <pierce@hogranch.com>

From: John R Pierce <pierce@hogranch.com>
To: pgsql-general@postgresql.org
Date: 2013-06-18T18:17:25Z
Lists: pgsql-general
On 6/18/2013 10:31 AM, bhanu udaya wrote:
> My PostgresSQL (9.2) is crashing after certain load tests. Currently, 
> postgressql is crashing when simulatenously 800 to 1000 threads are 
> run on a 10 million records schema. Not sure, if we have to tweak some 
> more parameters of postgres. Currently, the postgressql is configured 
> as below on a 7GB Ram on an Intel Xeon CPU E5507 2.27 GZ. Is this 
> postgres limitation to support only 800 threads or any other 
> configuration required. Please look at the log as below with errors. 
> Please reply

thats an insanely high number of connections on a quad core processor.   
in general, any more than 2-4X the number of cpu hardware threads in 
concurrent queries is counterproductive and will result in higher 
overhead and less throughput.   if you have a real world use case for 
800-1000 client threads and your workload is predominately short fast 
transactions ("OLTP"), you should use a connection pooler like pgbouncer 
and limit the number of active connections to something like 32 on your 
4 core/8 thread CPU.



-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast