Re: Fragmentation of WAL files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill Moran <wmoran(at)collaborativefusion(dot)com>
Cc: Jim Nasby <decibel(at)decibel(dot)org>, Postgresql list Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Fragmentation of WAL files
Date: 2007-04-26 15:37:42
Message-ID: 24354.1177601862@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

> In response to Jim Nasby <decibel(at)decibel(dot)org>:
>> I was recently running defrag on my windows/parallels VM and noticed
>> a bunch of WAL files that defrag couldn't take care of, presumably
>> because the database was running. What's disturbing to me is that
>> these files all had ~2000 fragments.

It sounds like that filesystem is too stupid to coalesce successive
write() calls into one allocation fragment :-(. I agree with the
comments that this might not be important, but you could experiment
to see --- try increasing the size of "zbuffer" in XLogFileInit to
maybe 16*XLOG_BLCKSZ, re-initdb, and see if performance improves.

The suggestion to use ftruncate is so full of holes that I won't
bother to point them all out, but certainly we could write more than
just XLOG_BLCKSZ at a time while preparing the file.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig A. James 2007-04-26 16:35:02 Re: Filesystem fragmentation (Re: Fragmentation of WAL files)
Previous Message Joshua D. Drake 2007-04-26 15:10:32 Re: Feature request - have postgresql log warning when new sub-release comes out.