Received: from maia.hub.org (unknown [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id E45ED1337999 for ; Sun, 24 Oct 2010 05:15:18 -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 31086-04 for ; Sun, 24 Oct 2010 08:15:11 +0000 (UTC) X-Greylist: delayed 00:09:46.587471 by SQLgrey-1.7.6 Received: from relay.ptn-ipout02.plus.net (relay.ptn-ipout02.plus.net [212.159.7.36]) by mail.postgresql.org (Postfix) with ESMTP id 56C451336FA7 for ; Sun, 24 Oct 2010 05:15:11 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAAKGw0xUXebr/2dsb2JhbAChZHG5PYVIBI1TFg Received: from outmx07.plus.net ([84.93.230.235]) by relay.ptn-ipout02.plus.net with ESMTP; 24 Oct 2010 09:05:22 +0100 Received: from mansionfamily.plus.com ([80.229.150.39] helo=pd600.barnhouse) by outmx07.plus.net with esmtp (Exim) id 1P9vZy-0003je-FM; Sun, 24 Oct 2010 09:05:22 +0100 Received: from [192.168.0.132] (unknown [192.168.0.132]) by pd600.barnhouse (Postfix) with ESMTP id 1C9C63A2731; Sun, 24 Oct 2010 09:13:03 +0100 (BST) Message-ID: <4CC3E8BF.4090409@mansionfamily.plus.com> Date: Sun, 24 Oct 2010 09:05:19 +0100 From: James Mansion User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Kevin Grittner CC: Bruce Momjian , Greg Smith , jd@commandprompt.com, Scott Marlowe , Steve Crawford , pgsql-performance@postgresql.org, Ben Chobot Subject: Re: BBU Cache vs. spindles References: <4CC04EA50200002500036C5E@gw.wicourts.gov> <201010211935.o9LJZTM21744@momjian.us> <4CC0513E0200002500036C68@gw.wicourts.gov> In-Reply-To: <4CC0513E0200002500036C68@gw.wicourts.gov> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.6 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201010/391 X-Sequence-Number: 40809 Kevin Grittner wrote: > On what do you base that assumption? I assume that we send a full > 8K to the OS cache, and the file system writes disk sectors > according to its own algorithm. With either platters or BBU cache, > the data is persisted on fsync; why do you see a risk with one but > not the other? > Surely 'the data is persisted sometime after our write and before the fsynch returns, but may be written: - in small chunks - out of order - in an unpredictable way' When I looked at the internals of TokyoCabinet for example, the design was flawed but would be 'fairly robust' so long as mmap'd pages that were dirtied did not get persisted until msync, and were then persisted atomically.