Re: [PATCHES] WAL Performance Improvements

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Janardhana Reddy <jana-reddy(at)mediaring(dot)com(dot)sg>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] WAL Performance Improvements
Date: 2002-02-25 05:35:02
Message-ID: 15817.1014615302@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Janardhana Reddy <jana-reddy(at)mediaring(dot)com(dot)sg> writes:
> I've attached a patch which should improve the performance of WAL by
> reducing the fsync time
> and write time by 50%(if OS page size is 4k) , if the transaction
> generate the WAL data less then 4k. Instead of
> writing every time 8k data in to the WAL file it will write only the
> portion of the data which
> as changed from the last time(Example : if transaction generates 150
> bytes of WAL data ,then it writes
> only 150 bytes instead of 8k).

As near as I can tell, this breaks WAL by failing to ensure that the
rest of the current page is zeroed. After crash and recovery, you might
read obsolete WAL records (written during the previous cycle of life
of the WAL segment file) and think they are valid.

I'd also be interested to see the measurements backing up the claim of 50%
performance improvement. That'd depend very largely on the filesystem block
size, no?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-02-25 05:38:29 Re: [HACKERS] Updated TODO item
Previous Message Neil Conway 2002-02-25 05:10:03 Re: [HACKERS] Updated TODO item

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-02-25 05:38:29 Re: [HACKERS] Updated TODO item
Previous Message Neil Conway 2002-02-25 05:10:03 Re: [HACKERS] Updated TODO item