Re: [HACKERS] Performance while loading data and indexing

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Greg Copeland <greg(at)CopelandConsulting(dot)Net>, shridhar_daithankar(at)persistent(dot)co(dot)in, PostgresSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>, PostgresSQL General Mailing List <pgsql-general(at)postgresql(dot)org>
Subject: Re: [HACKERS] Performance while loading data and indexing
Date: 2002-09-26 21:39:14
Message-ID: 200209262139.g8QLdEE08861@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-performance

Neil Conway wrote:
> Greg Copeland <greg(at)CopelandConsulting(dot)Net> writes:
> > On Thu, 2002-09-26 at 16:03, Neil Conway wrote:
> > > I'm not really familiar with the reasoning behind ext2's
> > > reputation as recovering poorly from crashes; if we fsync a WAL
> > > record to disk before we lose power, can't we recover reliably,
> > > even with ext2?
> >
> > Well, I have experienced data loss from ext2 before. Also, recovery
> > from crashes on large file systems take a very, very long time.
>
> Yes, but wouldn't you face exactly the same issues if you ran a
> UFS-like filesystem in asynchronous mode? Albeit it's not the default,
> but performance in synchronous mode is usually pretty poor.

Yes, before UFS had soft updates, the synchronous nature of UFS made it
slower than ext2, but now with soft updates, that performance difference
is gone so you have two files systems, ext2 and ufs, similar peformance,
but one is crash-safe and the other is not.

And, when comparing the journalling file systems, you have UFS vs.
XFS/ext3/JFS/Reiser, and UFS is faster. The only thing the journalling
file system give you is more rapid reboot, but frankly, if your OS goes
down often enough so that is an issue, you have bigger problems than
fsync time.

The big problem is that Linux went from non-crash safe right to
crash-safe and reboot quick. We need a middle ground, which is where
UFS/soft updates is.

> The fact that ext2 defaults to asynchronous mode and UFS (at least on
> the BSDs) defaults to synchronous mode seems like a total non-issue to
> me. Is there any more to the alleged difference in reliability?

The reliability problem isn't alleged. ext2 developers admits ext2
isn't 100% crash-safe. They will say it is usually crash-safe, but that
isn't good enough for PostgreSQL.

I wish I was wrong.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-09-26 21:41:22 Re: [HACKERS] Performance while loading data and indexing
Previous Message Doug McNaught 2002-09-26 21:37:10 Re: [HACKERS] Performance while loading data and indexing

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2002-09-26 21:39:50 Re: Reconstructing FKs in pg_dump
Previous Message Joe Conway 2002-09-26 21:37:11 fix for client utils compilation under win32

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2002-09-26 21:41:22 Re: [HACKERS] Performance while loading data and indexing
Previous Message Doug McNaught 2002-09-26 21:37:10 Re: [HACKERS] Performance while loading data and indexing