Re: [PERFORM] fsync method checking - Mailing list pgsql-hackers

From Kevin Brown
Subject Re: [PERFORM] fsync method checking
Date
Msg-id 20040319004112.GA19547@filer
Whole thread Raw
In response to Re: [PERFORM] fsync method checking  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PERFORM] fsync method checking
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Well, I wrote the program to allow testing.  I don't see a complex test
> > as being that much better than simple one.  We don't need accurate
> > numbers.  We just need to know if fsync or O_SYNC is faster.
>
> Faster than what?  The thing everyone is trying to point out here is
> that it depends on context, and we have little faith that this test
> program creates a context similar to a live Postgres database.

Note, too, that the preferred method isn't likely to depend just on the
operating system, it's likely to depend also on the filesystem type
being used.

Linux provides quite a few of them: ext2, ext3, jfs, xfs, and reiserfs,
and that's just off the top of my head.  I imagine the performance of
the various syncing methods will vary significantly between them.


It seems reasonable to me that decisions such as which sync method to
use should initially be made at installation time: have the test program
run on the target filesystem as part of the installation process, and
build the initial postgresql.conf based on the results.  You might even
be able to do some additional testing such as measuring the difference
between random block access and sequential access, and again feed the
results into the postgresql.conf file.  This is no substitute for
experience with the platform, but I expect it's likely to get you closer
to something optimal than doing nothing.  The only question, of course,
is whether or not it's worth going to the effort when it may or may not
gain you a whole lot.  Answering that is going to require some
experimentation with such an automatic configuration system.



--
Kevin Brown                          kevin@sysexperts.com

pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: UnixWare/CVS Tip/initdb.c needs to use threads
Next
From: Greg Stark
Date:
Subject: Re: COPY formatting