Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B7CF5635159 for ; Thu, 19 Mar 2009 18:59:14 -0300 (ADT) 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 54067-04 for ; Thu, 19 Mar 2009 18:59:07 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from EXHUB018-2.exch018.msoutlookonline.net (exhub018-2.exch018.msoutlookonline.net [64.78.17.17]) by mail.postgresql.org (Postfix) with ESMTP id 9AF69635106 for ; Thu, 19 Mar 2009 18:59:12 -0300 (ADT) Received: from EXVMBX018-1.exch018.msoutlookonline.net ([64.78.17.47]) by EXHUB018-2.exch018.msoutlookonline.net ([64.78.17.17]) with mapi; Thu, 19 Mar 2009 14:59:11 -0700 From: Scott Carey To: "ml@bortal.de" , Greg Smith CC: "pgsql-performance@postgresql.org" Date: Thu, 19 Mar 2009 14:59:10 -0700 Subject: Re: Postgres benchmarking with pgbench Thread-Topic: [PERFORM] Postgres benchmarking with pgbench Thread-Index: Acmo2ejPOo+tpPhmRRiDhnx1yVKTqQABAW5z Message-ID: In-Reply-To: <49C2B854.4080303@bortal.de> Accept-Language: en-US Content-Language: en X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=AWL=0.000 X-Spam-Level: X-Archive-Number: 200903/277 X-Sequence-Number: 33199 On 3/19/09 2:25 PM, "ml@bortal.de" wrote: >=20 > Here is my config (maybe with some odd setting): > http://pastebin.com/m5d7f5717 >=20 > I played around with: > - max_connections > - shared_buffers > - work_mem > - maintenance_work_mem > - checkpoint_segments > - effective_cache_size >=20 > ..but whatever i do, the graph looks the same. Any hints or tips what my > config should look like? Or are these results even okay? Maybe i am > driving myself crazy for nothing? >=20 > Cheers, > Mario >=20 I'm assuming this is linux: What linux version? What is your kernel's dirty_ratio and background_dirty_ratio? The default for a long time was 40 and 10, respectively. This is far too large for most uses on today's servers, you would not want 40% of your RAM to have pages not yet flushed to disk except perhaps on a small workstation= . See Current kernels default to 10 and 5, which is better. What is best for your real life workload will differ from pg_bench here. I don't know if this is the cause for any of your problems, but it is related closely to the checkpoint_segments and checkpoint size/time configuration. Is your xlog on the same device as the data? I have found that for most real world workloads, having the xlog on a separate device helps tremendously. Even more so for 'poor' RAID controllers like the PERC5 -- your sync writes in xlog will be interfering with the RAID controller cache of your data due to bad design. But my pg_bench knowledge with respect to this is limited.