Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id F0A6D632563 for ; Fri, 12 Feb 2010 10:04:04 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 33586-08 for ; Fri, 12 Feb 2010 14:03:28 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id 1A187632972 for ; Fri, 12 Feb 2010 10:03:53 -0400 (AST) Received: from localhost (localhost [127.0.0.1]) by spinlock.commandprompt.com (Postfix) with ESMTP id 90AE234803D; Fri, 12 Feb 2010 06:03:51 -0800 (PST) Received: from spinlock.commandprompt.com ([127.0.0.1]) by localhost (spinlock.commandprompt.com.commandprompt.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wPl2PO+NVTez; Fri, 12 Feb 2010 06:03:51 -0800 (PST) Received: from perhan.alvh.no-ip.org (190-95-31-230.bk17-dsl.surnet.cl [190.95.31.230]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 31AB5348034; Fri, 12 Feb 2010 06:03:51 -0800 (PST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 8FD876E557; Fri, 12 Feb 2010 11:03:48 -0300 (CLST) Date: Fri, 12 Feb 2010 11:03:48 -0300 From: Alvaro Herrera To: Kevin Grittner Cc: hannu@krosing.net, aidan@highrise.ca, jesper@krogh.cc, pgsql-performance@postgresql.org Subject: Re: moving pg_xlog -- yeah, it's worth it! Message-ID: <20100212140348.GA3737@alvh.no-ip.org> References: <4B750193020000250002F22D@gw.wicourts.gov> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B750193020000250002F22D@gw.wicourts.gov> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.551 tagged_above=-10 required=5 tests=AWL=0.048, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201002/200 X-Sequence-Number: 37621 Kevin Grittner wrote: > Hannu Krosing wrote: > > > Can it be, that each request does at least 1 write op (update > > session or log something) ? > > Well, the web application connects through a login which only has > SELECT rights; but, in discussing a previous issue we've pretty well > established that it's not unusual for a read to force a dirty buffer > to write to the OS. Perhaps this is the issue here again. Nothing > is logged on the database server for every request. I don't think it explains it, because dirty buffers are obviously written to the data area, not pg_xlog. > 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. That's worth trying. > Anyway, given that these are replication > targets, and aren't the "database of origin" for any data of their > own, I guess there's no reason not to try asynchronous commit. Yeah; since the transactions only ever write commit records to WAL, it wouldn't matter a bit that they are lost on crash. And you should see an improvement, because they wouldn't have to flush at all. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support