Re: performance regression with Linux 2.6.33 and glibc 2.12 - Mailing list pgsql-performance

From Andres Freund
Subject Re: performance regression with Linux 2.6.33 and glibc 2.12
Date
Msg-id 201006041725.06308.andres@anarazel.de
Whole thread Raw
In response to Re: performance regression with Linux 2.6.33 and glibc 2.12  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-performance
On Friday 04 June 2010 15:59:05 Tom Lane wrote:
> Marc Cousin <cousinmarc@gmail.com> 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

pgsql-performance by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Weird XFS WAL problem
Next
From: Marc Cousin
Date:
Subject: Re: performance regression with Linux 2.6.33 and glibc 2.12