Re: performance regression with Linux 2.6.33 and glibc 2.12

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-performance(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Marc Cousin <cousinmarc(at)gmail(dot)com>
Subject: Re: performance regression with Linux 2.6.33 and glibc 2.12
Date: 2010-06-04 15:25:05
Message-ID: 201006041725.06308.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Friday 04 June 2010 15:59:05 Tom Lane wrote:
> Marc Cousin <cousinmarc(at)gmail(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Marc Cousin 2010-06-04 15:29:04 Re: performance regression with Linux 2.6.33 and glibc 2.12
Previous Message Kevin Grittner 2010-06-04 15:23:52 Re: Weird XFS WAL problem