Re: Re: New Linux xfs/reiser file systems - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: Re: New Linux xfs/reiser file systems
Date
Msg-id 200105041828.f44ISHO02097@candle.pha.pa.us
Whole thread Raw
In response to New Linux xfs/reiser file systems  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
> > There have been multiple reports of poor PostgreSQL performance on
> > Reiser and xfs.  I don't have numbers, though.  Frankly, I think we need
> > xfs and reiser experts involved to figure out our options here.
> 
> I've done some testing to see how Reiserfs performs
> vs ext2, and also various for various values of wal_sync_method while on a
> reiserfs partition. The attached graph shows the results. The y axis is
> transactions per second and the x axis is the transaction number. It was
> clear that, at least for my specific app, ext2 was significantly faster.
> 
> The hardware I tested on has an Athalon 1 Ghz cpu and 512 MB ram. The
> harddrive is a 2 year old IDE drive. I'm running Red Hat 7 with all the
> latest updates, and a freshly compiled 2.4.2 kernel with the latest Reiserfs
> patch, and of course PostgreSQL 7.1. The transactions were run in a loop,
> 700 times per test, to insert sample data into 4 tables. I used a PHP script
> running on the same machine to do the inserts.
> 
> I'd be happy to provide more detail or try a different variation if anyone
> is interested.

This is hugely helpful.

Yikes, look at those lines.  It shows a few things.  

First, under Reiser, nosync, fsync, and fdatasync are pretty much the
same.  The big surprise here is that fsync doesn't seem to have any
effect.

Second surprise is that open fsync, which synces on every write rather
than on end of transaction, was slower.  I believe this should be slower
if multiple WAL writes are being made in one transaction.  fdatasync
would sync just at end of transaction, while each WAL write would be
synced by open fsync.

And the largest surpise is that ext2 is faster, but not because of
fsync, and almost double so.  Keep in mind that WAL writes are no the
only write happening.  Though in 7.1 we don't flush the data blocks to
disk, we do write to disk as the buffer cache fill up with dirty
buffers.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: New Linux xfs/reiser file systems
Next
From: "G. Anthony Reina"
Date:
Subject: 7.1.1