Re: [HACKERS] Performance while loading data and indexing

From: Yury Bokhoncovich <byg(at)center-f1(dot)ru>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, <shridhar_daithankar(at)persistent(dot)co(dot)in>, <pgsql-hackers(at)postgresql(dot)org>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: [HACKERS] Performance while loading data and indexing
Date: 2002-09-27 05:14:40
Message-ID: Pine.LNX.4.44L0.0209271201580.7775-100000@panda.center-f1.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-performance

Hello!

On Thu, 26 Sep 2002, Bruce Momjian 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

On relatively big volumes ext2 recovery can end up in formatting the fs
under certain cirrumstances.;-)

> > > I assumed it was the double fsync for the normal and journal that
> > > made the journalling file systems slog.
> >
> > Well, a journalling file system would need to write a journal entry
> > and flush that to disk, even if fsync is disabled -- whereas without
> > fsync enabled, ext2 doesn't have to flush anything to disk. ISTM that
> > the performance advantage of ext2 over ext3 is should be even larger
> > when fsync is not enabled.
>
> Yes, it is still double-writing. I just thought that if that wasn't
> happening while the db was waiting for a commit that it wouldn't be too
> bad.
>
> Is it just me or do all the Linux file systems seem like they are
> lacking something when PostgreSQL is concerned? We just want a UFS-like
> file system on Linux and no one has it.

mount -o sync an ext2 volume on Linux - and you can get a "UFS-like" fs.:)
mount -o async an FFS volume on FreeBSD - and you can get boost in fs
performance.
Personally me always mount ext2 fs where Pg is living with sync option.
Fsync in pg is off (since 6.3), this way successfully pass thru a few
serious crashes on various systems (mostly on power problems).
If fsync is on in Pg, performance gets so-oh-oh-oh-oh slowly!=)
I just have done upgrade from 2.2 kernel on ext2 to ext3 capable 2.4 one
so I'm planning to do some benchmarking. Roughly saying w/o benchmarks,
the performance have been degraded in 2/3 proportion.
"But better safe then sorry".

--
WBR, Yury Bokhoncovich, Senior System Administrator, NOC of F1 Group.
Phone: +7 (3832) 106228, ext.140, E-mail: byg(at)center-f1(dot)ru(dot)
Unix is like a wigwam -- no Gates, no Windows, and an Apache inside.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2002-09-27 05:56:00 Re: SQL subquery to supply table name?
Previous Message Tom Lane 2002-09-27 05:06:42 Re: Quick Pg/PLSQL question

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-27 05:43:37 Re: Cascaded Column Drop
Previous Message Jim Mercer 2002-09-27 04:31:48 Re: hacker help: PHP-4.2.3 patch to allow restriction of database access

Browse pgsql-performance by date

  From Date Subject
Next Message Adrian von Bidder 2002-09-27 09:42:22
Previous Message Tom Lane 2002-09-27 03:07:44 Re: [HACKERS] Performance while loading data and indexing