Re: What is WAL used for?

From: "Holger Hoffstaette" <usenet(at)wizards(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: What is WAL used for?
Date: 2003-11-30 13:43:07
Message-ID: pan.2003.11.30.13.43.05.375000@wizards.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 28 Nov 2003 15:19:36 +0100, Thierry Missimilly wrote:

> I have tried a little bench with pgbench on my 2 proc 2.4 Gb with 4 GB RAM
> and Linux RH 9.0.
> ...

Which filesystem in which mode? Yes, that's relevant and in fact the
make-or-break factor here, at least from the POV of the hard drive.
I guess RH9 uses ext3 in journaled mode by default, which does data as
well as metadata journaling. Retry your benchmarks with both ext2 and ext3
in data=writeback mode; both results should be much closer to each other.

> So, should i conclude that even if the whole database is in memory, the
> TPS result is slow down by the WAL mecanism which wait for writting the

No, you need to take the working of your filesystem into account. As soon
as data journaling comes into play, it is normal and in fact unavoidable
that performance drops, because everything is written effectively twice -
once into the log, once into the file, and to do so the drive has to move.
WAL with ext3's data journaling is quite unnecessary because the WAL
sort of IS the database's journal.

Holger
--
A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kamil Kukura 2003-11-30 13:57:40 Re: passing function's output into C function
Previous Message Peter Eisentraut 2003-11-30 13:21:20 Re: Triggers, Stored Procedures, PHP. was: Re: PostgreSQL