Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 47A0C632EDD for ; Sat, 13 Feb 2010 02:30:04 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 05729-05 for ; Sat, 13 Feb 2010 06:29:53 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.10]) by mail.postgresql.org (Postfix) with ESMTP id 8DC936327C0 for ; Sat, 13 Feb 2010 02:29:53 -0400 (AST) Received: from [192.168.0.105] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MK3ZF-1NfMAA3edB-001b2a; Sat, 13 Feb 2010 07:29:43 +0100 Message-ID: <4B7646D2.3010508@2ndquadrant.com> Date: Sat, 13 Feb 2010 01:29:38 -0500 From: Greg Smith User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Kevin Grittner CC: hannu@krosing.net, alvherre@commandprompt.com, aidan@highrise.ca, jesper@krogh.cc, pgsql-performance@postgresql.org Subject: Re: moving pg_xlog -- yeah, it's worth it! References: <4B750193020000250002F22D@gw.wicourts.gov> In-Reply-To: <4B750193020000250002F22D@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18HBVLk/XUZQYLo8wSqW+JqK83kRtY8oWXzn60 UcY5E3ZZjNwqnuzhW0DQ88Q0lfUw6VMNjBLXOUCezffGINhp5z pYpIhG4Qdt3gmKrZPsPSBnu6q9xODFd X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/216 X-Sequence-Number: 37637 Kevin Grittner wrote: > I wonder if it might also pay to make the background writer even more > aggressive than we have, so that SELECT-only queries don't spend so > much time writing pages. You can easily quantify if the BGW is aggressive enough. Buffers leave the cache three ways, and they each show up as separate counts in pg_stat_bgwriter: buffers_checkpoint, buffers_clean (the BGW), and buffers_backend (the queries). Cranking it up further tends to shift writes out of buffers_backend, which are the ones you want to avoid, toward buffers_clean instead. If buffers_backend is already low on a percentage basis compared to the other two, there's little benefit in trying to make the BGW do more. -- Greg Smith 2ndQuadrant Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.com