Re: Perfomance Tuning - Mailing list pgsql-performance

From Bruce Momjian
Subject Re: Perfomance Tuning
Date
Msg-id 200308131537.h7DFbGu23405@candle.pha.pa.us
Whole thread Raw
In response to Re: Perfomance Tuning  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-performance
Ron Johnson wrote:
> On Tue, 2003-08-12 at 13:39, Bruce Momjian wrote:
> > OK, I got some hard evidence.  Here is a discussion on the Linux kernel
> > mailing list with postings from Allen Cox (ac Linux kernels) and Stephen
> > Tweedie (ext3 author).
> >
> >     http://www.tux.org/hypermail/linux-kernel/1999week14/subject.html#start
> >
> > Search for "softupdates and ext2".
> >
> > Here is the original email in the thread:
> >
> >     http://www.tux.org/hypermail/linux-kernel/1999week14/0498.html
> >
> > Summary is at:
> >
> >     http://www.tux.org/hypermail/linux-kernel/1999week14/0571.html
> >
> > and conclusion in:
> >
> >     http://www.tux.org/hypermail/linux-kernel/1999week14/0504.html
> >
> > I now remember the issue --- ext2 makes all disk changes asynchonously
> > (unless you mount it via sync, which is slow).  This means that the file
> > system isn't always consistent on disk.
> >
> > UFS has always sync metadata (file/directory creation) to the disk so
> > the disk was always consistent, but doesn't sync the data to the disk,
> > for performance reasons.  With soft updates, the metadata writes are
> > delayed, and written to disk in an order that keeps the file system
> > consistent.
> >
> > Is this enough evidence, or should I keep researching?
>
> This is all 4 years old, though.  Isn't that why the ext3 "layer" was

Yes, it is four years old, but no one has told me ext2 has changed in
this regard, and seeing that they created ext3 to fix these aspects, I
would think ext2 hasn't changed.

> created, and filesystems like reiserFS, XFS and (kinda) JFS were added
> to Linux?

Yes, it is those ext2 limitations that caused the development of ext3
and the others.  However, they went much father than implementing a
crash-safe file system, but rather enabled a file system that doesn't
need fsck on crash reboot.  This causes fsync of data and metadata (file
creation), which slows down the file system, and PostgreSQL doesn't need
it.

You can mount ext3 and others with data=writeback to fsync only
metadata, but it isn't the default.

I am not sure what the ext3 layer is.

--
  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

pgsql-performance by date:

Previous
From: ingrid martinez
Date:
Subject: Re: How can I Improve performance in Solaris?
Next
From: Josh Berkus
Date:
Subject: Re: Perfomance Tuning