From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>, "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: win32 performance - fsync question |
Date: | 2005-02-17 19:28:12 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE4768E3@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>> > WinXP fsync = true 20-28 tps
>> > WinXP fsync = false 600 tps
>> > Linux fsync = true 800 tps
>> > Linux fsync = false 980 tps
>>
>> Wow, that's terrible on Windows. If there's a solution, it'd be nice
>to
>> backport it...
>>
>
>there is. I just rigged up a test benchmark comparing sync methods. I
>ran on 2 boxes, my xp workstation on 10k raptor and a win2k server on
>3ware raid 5 (also on 10k raptors).
>
>Workstation:
>did 1000 FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING writes in
>5.729633 seconds
>did 1000 FILE_FLAG_WRITE_THROUGH writes in 0.593322 seconds
>did 1000 flushfilebuffers writes in 15.898989 seconds
>
>server:
>did 1000 FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING writes in
>16.501076 seconds
>did 1000 FILE_FLAG_WRITE_THROUGH writes in 16.104133 seconds
>did 1000 flushfilebuffers writes in 18.962439 seconds
>
>server after running super altra secret dskcache '+p' mode:
>did 1000 FILE_FLAG_WRITE_THROUGH | FILE_FLAG_NO_BUFFERING writes in
>0.256574 seconds
>did 1000 FILE_FLAG_WRITE_THROUGH writes in 2.627602 seconds
>did 1000 flushfilebuffers writes in 15.290967 seconds
>
>dskcache.exe is required to enable power protect mode (unbypassing raid
>conttoller write cache settings) on win2k.
I draw the following conclusions:
1) Using just FILE_FLAG_WRITE_THROUGH is not enough. It sends it out of
the cache, but it returns to the application before the data has hit
disk. AFAIK, that's not good enough for us.
2) Using both, we can get a *significant* speed boost.
Tom, if you look at all the requirements of FILE_FLAG_NO_BUFFERING on
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/
base/createfile.asp, can you say offhand if the WAL code fulfills them?
If it does, we can probably just hack it in win32_open (at least for
testing and a possible backpatch). Ifn ot, then we'll need to stuff code
in xlog.c.
(Specifically, I'm most worried about the memory alignment requirement)
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2005-02-17 19:28:29 | Re: win32 performance - fsync question |
Previous Message | Richard Huxton | 2005-02-17 19:21:31 | Re: win32 performance - fsync question |