From: | "Magnus Hagander" <mha(at)sollentuna(dot)net> |
---|---|
To: | "Zeugswetter Andreas DAZ SD" <ZeugswetterA(at)spardat(dot)at>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | <pgsql-hackers(at)postgresql(dot)org>, "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
Subject: | Re: win32 performance - fsync question |
Date: | 2005-02-20 19:20:05 |
Message-ID: | 6BCB9D8A16AC4241919521715F4D8BCE476915@algol.sollentuna.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>> One point that I no longer recall the reasoning behind is that xlog.c
>> doesn't think O_SYNC is a preferable default over fsync.
>
>For larger (>8k) transactions O_SYNC|O_DIRECT is only good
>with the recent
>pending patch to group WAL writes together. The fsync method
>gives the OS a
>chance to do the grouping. (Of course it does not matter if
>you have small
>tx < 8k WAL)
This would be true for fdatasync() but not for fsync(), I think.
On win32 (which started this discussion, fsync will sync the directory
entry as well, which will lead to *at least* two seeks on the disk.
Writing two blocks after each other to an O_SYNC opened file should give
exactly two seeks.
Of course, this only moves the breakpoint up to n blocks, where n > 2 (3
or 4 depending on how many seeks the filesystem will require).
//Magnus
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2005-02-20 19:36:43 | Re: Query optimizer 8.0.1 (and 8.0) |
Previous Message | Tom Lane | 2005-02-20 19:01:20 | Re: SMP buffer management test question |