Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 5F7A36329D0 for ; Thu, 1 Jul 2010 02:01:24 -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 29817-03 for ; Thu, 1 Jul 2010 05:01:17 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.17.9]) by mail.postgresql.org (Postfix) with ESMTP id B333E633336 for ; Thu, 1 Jul 2010 02:00:53 -0300 (ADT) Received: from [10.0.12.132] ([217.41.235.4]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0M4Tee-1PMK462VYq-00yiam; Thu, 01 Jul 2010 07:00:03 +0200 Message-ID: <4C2C6721.2010000@2ndquadrant.com> Date: Thu, 01 Jul 2010 06:00:01 -0400 From: Greg Smith User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: Jignesh Shah CC: Bruce Momjian , Tom Lane , Robert Haas , Dimitri Fontaine , Josh Berkus , postgres performance list Subject: Re: PostgreSQL as a local in-memory cache References: <201006300139.o5U1dHN12285@momjian.us> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX185DUr6Yqjyzs1vf8hJFB90xsXMIIFu3etCGnE Y78CRmPnt4x0SXlk1E2JH8TaDflJqp0H2GDTcqKUWSki2t5Z/T dtANsHxAZgDf871/sBDPjP1mVWaV5vu X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.127 tagged_above=-10 required=5 tests=BAYES_00=-1.9, DATE_IN_FUTURE_03_06=3.027, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: * X-Archive-Number: 201007/1 X-Sequence-Number: 39390 On 6/30/2010 2:21 PM, Jignesh Shah wrote: > If the underlying WAL disk is SSD then it seems I can get > synchronous_commit=on to work faster than > synchronous_commit=off.. The first explanation that pops to mind is that synchronous_commit is writing all the time, which doesn't have the same sort of penalty on SSD. Whereas if you turn it off, then there are some idle periods where the SSD could be writing usefully, but instead it's buffering for the next burst instead. The importance of that can be magnified on operating systems that do their own buffering and tend to lag behind writes until they see an fsync call, like is the case on Linux with ext3.