Re: [HACKERS] Performance while loading data and indexing

Bruce Momjian <pgman@candle.pha.pa.us>

From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Greg Copeland <greg@copelandconsulting.net>
Cc: shridhar_daithankar@persistent.co.in, PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>, PostgresSQL General Mailing List <pgsql-general@postgresql.org>
Date: 2002-09-26T20:00:48Z
Lists: pgsql-hackers, pgsql-performance, pgsql-general
Greg Copeland wrote:
> > The paper does recommend ext3, but the differences between file systems
> > are very small. If you are seeing 'cp' as slow, I wonder if it may be
> > something more general, like poorly tuned hardware or something. You can
> > use 'dd' to throw some data around the file system and see if that is
> > showing slowness;  compare those numbers to another machine that has
> > different hardware/OS.
> > 
> > Also, though ext3 is slower, turning fsync off should make ext3 function
> > similar to ext2.  That would be an interesting test if you suspect ext3.
> 
> I'm curious as to why you recommended ext3 versus some other (JFS,
> XFS).  Do you have tests which validate that recommendation or was it a
> simple matter of getting the warm fuzzies from familiarity?

I used the attached email as a reference.  I just changed the wording to
be:
	
	File system choice is particularly difficult on Linux because there are
	so many file system choices, and none of them are optimal: ext2 is not
	entirely crash-safe, ext3 and xfs are journal-based, and Reiser is
	optimized for small files. Fortunately, the journaling file systems
	aren't significantly slower than ext2 so they are probably the best
	choice.

so I don't specifically recommend ext3 anymore.  As I remember, ext3 is
good only in that it can read ext2 file systems.  I think XFS may be the
best bet.

Can anyone clarify if "data=writeback" is safe for PostgreSQL. 
Specifically, are the data files recovered properly or is this option
only for a filesystem containing WAL?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073