Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 5636A6332AF for ; Mon, 11 Jan 2010 19:59:40 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 33162-06 for ; Mon, 11 Jan 2010 23:59:23 +0000 (UTC) X-Greylist: delayed 00:06:38.831281 by SQLgrey-1.7.6 Received: from 42.mail-out.ovh.net (42.mail-out.ovh.net [213.251.189.42]) by mail.postgresql.org (Postfix) with SMTP id 6425763298A for ; Mon, 11 Jan 2010 19:59:29 -0400 (AST) Received: (qmail 26524 invoked by uid 503); 11 Jan 2010 23:53:05 -0000 Received: from b9.ovh.net (HELO mail632.ha.ovh.net) (213.186.33.59) by 42.mail-out.ovh.net with SMTP; 11 Jan 2010 23:53:05 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 11 Jan 2010 23:52:40 -0000 Received: from par69-8-88-161-102-87.fbx.proxad.net (HELO soyouz) (88.161.102.87) by ns0.ovh.net with SMTP; 11 Jan 2010 23:52:39 -0000 Date: Tue, 12 Jan 2010 00:53:29 +0100 To: "Bob Dusek" , "Ivan Voras" Subject: Re: performance config help From: =?utf-8?Q?Pierre_Fr=C3=A9d=C3=A9ric_Caillau?= =?utf-8?Q?d?= Cc: pgsql-performance@postgresql.org Content-Type: text/plain; format=flowed; delsp=yes; charset=utf-8 MIME-Version: 1.0 References: <61039b861001110544o2c352763q13dcf9d78a156714@mail.gmail.com> <61039b861001110842g15bb1f26jc50b6e6762e01427@mail.gmail.com> <61039b861001111057t6443b526pdc312ff2717d6227@mail.gmail.com> Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <61039b861001111057t6443b526pdc312ff2717d6227@mail.gmail.com> User-Agent: Opera Mail/9.62 (Linux) X-Ovh-Tracer-Id: 13386386943083808491 X-Ovh-Remote: 88.161.102.87 (par69-8-88-161-102-87.fbx.proxad.net) X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-Spam-Check: DONE|U 0.5/N X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.498 tagged_above=-10 required=5 tests=AWL=0.101, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201001/230 X-Sequence-Number: 37110 > Each of the 256 requests was being processed by a php process. So, it > could > certainly be faster. But, the fact that we're seeing the db performance > degrade would seem to indicate that our application is fast enough to > punish > the db. Isn't that true? Not necessarily. Your DB still has lots of idle CPU, so perhaps it's your client which is getting over the top. Or you have locking problems in your DB. Things to test : - vmstat on the benchmark client - iptraf on the network link - monitor ping times between client and server during load test Some time ago, I made a benchmark simulating a forum. Postgres was saturating the gigabit ethernet between server and client... If those PHP processes run inside Apache, I'd suggest switching to lighttpd/fastcgi, which has higher performance, and uses a limited, controllable set of PHP processes (and therefore DB connections), which in turn uses much less memory. PS : try those settings : fsync = fdatasync wal_buffers = 64MB walwriter_delay = 2ms synchronous commits @ 1 s delay