Re: TRUNCATE TABLE - Mailing list pgsql-performance

From Tom Lane
Subject Re: TRUNCATE TABLE
Date
Msg-id 661.1186425974@sss.pgh.pa.us
Whole thread Raw
In response to Re: TRUNCATE TABLE  (Decibel! <decibel@decibel.org>)
List pgsql-performance
Decibel! <decibel@decibel.org> writes:
> Interesting. I'm guessing that ext3 has to sync out the entire journal
> up to the point in time that fsync() is called, regardless of what
> files/information the journal contains. Fortunately I think it's common
> knowledge to mount PostgreSQL filesystems with data=3Dwriteback, which
> hopefully eliminates much of that bottleneck... but if you don't do
> noatime you're probably still spewing a lot out to the drive.

FWIW, I tried to test the above by running Pavel's script on an ext3
partition mounted noatime,data=writeback.  This didn't seem to make any
difference --- still very large deviations in the time to do a TRUNCATE.
However the problem seems harder to reproduce now than it was three weeks
ago.  In the meantime I installed a 2.6.22-based kernel instead of the
2.6.20 one that Fedora was using before; I wonder whether the kernel
guys tweaked something related ...

            regards, tom lane

pgsql-performance by date:

Previous
From: "Ted Jordan"
Date:
Subject: Re: Default Performance between 8.0 and 8.1
Next
From: Heikki Linnakangas
Date:
Subject: Re: Extreme slow select query 8.2.4