Re: WAL Performance Improvements

From: Janardhana Reddy <jana-reddy(at)mediaring(dot)com(dot)sg>
To: Helge Bahmann <bahmann(at)math(dot)tu-freiberg(dot)de>
Cc: pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: WAL Performance Improvements
Date: 2002-02-27 08:22:42
Message-ID: 3C7C9752.D7986823@mediaring.com.sg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Helge Bahmann wrote:

> On Tue, 26 Feb 2002, Janardhana Reddy wrote:
> > SUMMARY :
> >
> > Test1: (data_size= 8192 , with test program)
> > fdatasync time +write time: 3141+46 = 3187 usec/call
> > Time taken for 10000 iterations: nearly 40 seconds
> > Test2 : (data_size = 160, with test program)
> > fdatasync time+write time: 396 +13 = 409 usec/call
> > Time taken for 10000 iterations: nealy 4 seconds
>
> This only shows that your harddisk is doing write caching, although it
> claims it does not (And on such systems I am tempted to say you can
> turn off fsync unconditionally as it will gain you almost nothing).
>
> Please look at the numbers: It is really *impossible* for any harddisk to
> write to the same location more than 2000 times per second - simply due to
> the fact that the disks are not rotating that fast. The fact that turning
> writing caching on or off does not make a difference should make you
> suspicious.
>
> (In fact looking more closely at the numbers I am tempted to bet that you
> operate your IDE disk in PIO mode: 1024bytes/400usec= 8192bytes/3200usec=
> 2.5MByte/s, and all you are benchmarking is the PIO transfer rate of your
> IDE-controller/CPU combination).
>
> This is not to say that your WAL optimization is worthless, but the
> benchmark you gave is certainly wrong.
>
> 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) |

you are correct the hard disk using on my machine is doing write caching .
I have repeted Test1 and Test2 on another machines with scsci , the time
taken by Test1 and Test2 are almost same and it around 100seconds.
what i don't understand is In Test1 the OS keeps 8192 bytes(512X16= 16
blocks) on harddisk.
where as in Test2 the OS keeps only 512(1block) on hard disk during the
fdatasync. so
how come harddisk takes same time to write 1 block or 16 blocks?. Is it
because
the hard disk seek time is much larger when compare to hard disk write
time?.

Regards
jana

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2002-02-27 08:34:28 Re: Rename sequence bug/feature
Previous Message Mike Mascari 2002-02-27 08:09:45 LRU and full table scans

Browse pgsql-patches by date

  From Date Subject
Next Message mkscott 2002-02-27 09:31:48 Re: Globals Storage and Thread-safety
Previous Message Tom Lane 2002-02-27 07:08:15 Re: Patch to add CREATE OPERATOR CLASS