Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 7B92D6335D4 for ; Thu, 3 Jun 2010 15:18:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 86137-03 for ; Thu, 3 Jun 2010 18:18:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mail.postgresql.org (Postfix) with ESMTP id EA572633407 for ; Thu, 3 Jun 2010 15:18:40 -0300 (ADT) 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 0M2WiT-1P9SVV2dLZ-00rxEc; Thu, 03 Jun 2010 20:18:37 +0200 Message-ID: <4C07F1FA.8010909@2ndquadrant.com> Date: Thu, 03 Jun 2010 14:18:34 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Kevin Grittner CC: Craig James , Matthew Wakeling , pgsql-performance@postgresql.org Subject: Re: Weird XFS WAL problem References: <4C06E994.2080905@emolecules.com> <4C06EC01.3060506@catalyst.net.nz> <4C07E103.9020909@emolecules.com> <4C07A0830200002500031E74@gw.wicourts.gov> In-Reply-To: <4C07A0830200002500031E74@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1+mm8L1DO5CowXJqQo5djVr/IGMkYJf1rSiZ0R +fe/PLkT1lb0hvubCfYMBEGGOwKSRMe/cDBTKh9oDkzF6mQcLr S7snLB9qHAGE0fhU2J9EUp7KhnUasxd X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-10 required=5 tests=BAYES_50=0.8, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/60 X-Sequence-Number: 38916 Kevin Grittner wrote: > I've seen this, too (with xfs). Our RAID controller, in spite of > having BBU cache configured for writeback, waits for actual > persistence on disk for write barriers (unlike for fsync). This > does strike me as surprising to the point of bordering on qualifying > as a bug. Completely intentional, and documented at http://xfs.org/index.php/XFS_FAQ#Q._Should_barriers_be_enabled_with_storage_which_has_a_persistent_write_cache.3F The issue is that XFS will actually send the full "flush your cache" call to the controller, rather than just the usual fsync call, and that eliminates the benefit of having a write cache there in the first place. Good controllers respect that and flush their whole write cache out. And ext4 has adopted the same mechanism. This is very much a good thing from the perspective of database reliability for people with regular hard drives who don't have a useful write cache on their cheap hard drives. It allows them to keep the disk's write cache on for other things, while still getting the proper cache flushes when the database commits demand them. It does mean that everyone with a non-volatile battery backed cache, via RAID card typically, needs to turn barriers off manually. I've already warned on this list that PostgreSQL commit performance on ext4 is going to appear really terrible to many people. If you benchmark and don't recognize ext3 wasn't operating in a reliable mode before, the performance drop now that ext4 is doing the right thing with barriers looks impossibly bad. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us