Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id AB8B76335BB for ; Fri, 4 Jun 2010 12:25: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 96780-02 for ; Fri, 4 Jun 2010 15:25:08 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.anarazel.de (mail.anarazel.de [217.115.131.40]) by mail.postgresql.org (Postfix) with ESMTP id C3AAB633530 for ; Fri, 4 Jun 2010 12:25:08 -0300 (ADT) Received: from alap2.localnet (p579FA9CD.dip.t-dialin.net [87.159.169.205]) by mail.anarazel.de (Postfix) with ESMTPSA id B7CD9448006; Fri, 4 Jun 2010 17:25:07 +0200 (CEST) From: Andres Freund To: pgsql-performance@postgresql.org Subject: Re: performance regression with Linux 2.6.33 and glibc 2.12 Date: Fri, 4 Jun 2010 17:25:05 +0200 User-Agent: KMail/1.13.2 (Linux/2.6.34-andres-08406-g52b0ace; KDE/4.4.2; x86_64; ; ) Cc: Tom Lane , Marc Cousin References: <201006041539.03868.cousinmarc@gmail.com> <2135.1275659945@sss.pgh.pa.us> In-Reply-To: <2135.1275659945@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006041725.06308.andres@anarazel.de> 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/90 X-Sequence-Number: 38946 On Friday 04 June 2010 15:59:05 Tom Lane wrote: > Marc Cousin writes: > > I hope I'm not going to expose an already known problem, but I couldn't > > find it mailing list archives (I only found > > http://archives.postgresql.org/pgsql- hackers/2009-12/msg01543.php). > > You sure this isn't the well-known "ext4 actually implements fsync > where ext3 didn't" issue? I doubt it. It reads to me like he is testing the two methods on the same installation with the same kernel > > with wal_sync_method = open_datasync (new default) > > marc=# INSERT INTO test SELECT generate_series(1,100000); > > INSERT 0 100000 > > Time: 16083,912 ms > > > > with wal_sync_method = fdatasync (old default) > > > > marc=# INSERT INTO test SELECT generate_series(1,100000); > > INSERT 0 100000 > > Time: 954,000 ms Its not actually surprising that in such a open_datasync is hugely slower than fdatasync. With open_datasync every single write will be synchronous, very likely not reordered/batched/whatever. In contrast to that with fdatasync it will only synced in way much bigger batches. Or am I missing something? I always thought the synchronous write methods to be a fallback kludge and didnt realize its actually the preferred method... Andres