Re: win32 performance - fsync question

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: win32 performance - fsync question
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE476915@algol.sollentuna.se
обсуждение исходный текст
Ответ на win32 performance - fsync question  ("E.Rodichev" <er@sai.msu.su>)
Список 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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: SMP buffer management test question
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Query optimizer 8.0.1 (and 8.0)