Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7177B6333AD for ; Sun, 6 Jun 2010 04:48:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 53252-08 for ; Sun, 6 Jun 2010 07:48:29 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [202.4.227.11]) by mail.postgresql.org (Postfix) with ESMTP id 7D8626332C1 for ; Sun, 6 Jun 2010 04:48:30 -0300 (ADT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id F2C96A2B8 for ; Sun, 6 Jun 2010 15:48:23 +0800 (WST) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id 07D32AFA1C for ; Sun, 6 Jun 2010 15:48:20 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 8rqdbgDCqnM1 for ; Sun, 6 Jun 2010 15:48:14 +0800 (WST) Received: from [10.1.1.8] (124-169-94-125.dyn.iinet.net.au [124.169.94.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id B93C6AFA18 for ; Sun, 6 Jun 2010 15:48:14 +0800 (WST) Message-ID: <4C0B52C3.4050901@postnewspapers.com.au> Date: Sun, 06 Jun 2010 15:48:19 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: How filesystems matter with PostgreSQL References: <4C08EEDF.7090403@mtu.net> <4C0AD180.90607@2ndquadrant.com> <4C0AD280.5020105@mtu.net> <4C0AD547.2040308@2ndquadrant.com> <4C0AD7DF.1030705@mtu.net> <4C0B455C.8050902@cheapcomplexdevices.com> In-Reply-To: <4C0B455C.8050902@cheapcomplexdevices.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.79 tagged_above=-10 required=5 tests=BAYES_50=0.8, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201006/125 X-Sequence-Number: 38981 On 06/06/10 14:51, Ron Mayer wrote: > Jon Schewe wrote: > >> OK, so if I want the 15 minute speed, I need to give up safety (OK in >> this case as this is just research testing), or see if I can tune >> postgres better. > > Depending on your app, one more possibility would be to see if you > can re-factor the application so it can do multiple writes in parallel > rather than waiting for each one to complete. If I understand right, > then many transactions could potentially be handled by a single fsync. By using a commit delay, yes. (see postgresql.conf). You do open up the risk of losing transactions committed within the commit delay period, but you don't risk corruption like you do with fsync. Sometimes you can also batch work into bigger transactions. The classic example here is the usual long stream of individual auto-committed INSERTs, which when wrapped in an explicit transaction can be vastly quicker. -- Craig Ringer