Unix Technical Forum

Re: win32 performance - fsync question

This is a discussion on Re: win32 performance - fsync question within the pgsql Hackers forums, part of the PostgreSQL category; --> >> One point that I no longer recall the reasoning behind is that xlog.c >> doesn't think O_SYNC is ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 03:48 AM
Magnus Hagander
 
Posts: n/a
Default Re: win32 performance - fsync question

>> 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


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:27 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com