[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [GENERAL] What is WAL used for?
From:       "Holger Hoffstaette" <usenet () wizards ! de>
Date:       2003-11-30 13:43:07
[Download RAW message or body]

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?



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic