On 07/03/2012 03:19 PM, Pawel Veselov
wrote:
Hi. Hmm. To get that kind of TPS with that design are you running with fsync=off or on storage that claims to flush I/O without actually doing so? Have you checked your crash safety? Is it just fairly big hardware? Why are you using so many connections? Unless you have truly monstrous hardware your system should achieve considerably greater throughput by reducing the connection count and queueing bursts of writes. You wouldn't even need an external pool in your case, just switch to a producer/consumer model where your accepting threads add work to separate and much fewer writer threads for sending to the DB. Writer threads could then do useful optimisations like multi-value-inserting or COPYing data, doing small batches in transactions, etc. I'm seriously impressed that your system is working under load at all with 800 concurrent connections fighting to write all at once.
postmaster forking and failing because of operating system resource limits like max proc count, anti-forkbomb measures, max file handles, etc? -- problem 2 --See how many connections the *server* thinks exist by examining pg_stat_activity . Check dmesg and the PostgreSQL server logs to see if you're hitting operating system limits. Look for fork() failures, unexplained segfaults, etc. -- Craig Ringer |