Re: WAL Performance Improvements

From: Helge Bahmann <bahmann(at)math(dot)tu-freiberg(dot)de>
To: Janardhana Reddy <jana-reddy(at)mediaring(dot)com(dot)sg>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: WAL Performance Improvements
Date: 2002-02-26 10:58:55
Message-ID: Pine.LNX.4.21.0202261136360.10460-100000@lothlorien.stunet2.tu-freiberg.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On Tue, 26 Feb 2002, Janardhana Reddy wrote:
> Test Results with Latest patch :
> environment: Intel PC ,IDE (harddisk),Linux Kernel 2.4.0 (OS
> Version). Single
> connection is connected to the database and pumping
> continously insert statements. each insert
> generates 160 bytes to WAL Log.

8192:
> Transaction Per Second : 332 TPS
> Time Taken by fdatasync : 2160

4096:
> Transaction Per Second : 435 TPS
> Time Taken by fdatasync : 512

Unforunately your timings are meaningless. Assuming you have a
10000rpm drive (that is, 166 rounds per second), it is physically
impossible to write 332 or 435 times per second to the same location
on the disk.

So I guess your disk is performing write-caching and not really writing
the data back when requested by fsync(). You may try to disable
write caching and see if it makes a difference:

hdparm -W 0 /dev/hda

But note that most (or even all) modern IDE drives will not disable write
caching even when instructed to do so. You should try to repeat the timings
using SCSI drives -- I guess you will not see any improvement here.

Regards
--
Helge Bahmann <bahmann(at)math(dot)tu-freiberg(dot)de> /| \__
Network admin, systems programmer /_|____\
_/\ | __)
$ ./configure \\ \|__/__|
checking whether build environment is sane... yes \\/___/ |
checking for AIX... no (we already did this) |

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2002-02-26 12:16:54 Re: COPY FROM is not 8bit clean
Previous Message John Gray 2002-02-26 10:32:17 Refactoring of command.c

Browse pgsql-patches by date

  From Date Subject
Next Message Janardhana Reddy 2002-02-26 12:33:43 Re: [PATCHES] WAL Performance Improvements
Previous Message Christopher Kings-Lynne 2002-02-26 08:36:42 minor doc patch for example in 'SET' docs