Re: fsync method checking

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: fsync method checking
Дата
Msg-id 11043.1079635442@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: fsync method checking  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: fsync method checking  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I have been poking around with our fsync default options to see if I can
> improve them.  One issue is that we never default to O_SYNC, but default
> to O_DSYNC if it exists, which seems strange.

As I recall, that was based on testing on some different platforms.
It's not particularly "strange": O_SYNC implies writing at least two
places on the disk (file and inode).  O_DSYNC or fdatasync should
theoretically be the fastest alternatives, O_SYNC and fsync the worst.

>     Compare fsync before and after write's close:
>             write, fsync, close    0.000707
>             write, close, fsync    0.000808

What does that mean?  You can't fsync a closed file.

> This shows terrible O_SYNC performance for 2 8k writes, but is faster
> for a single 8k write.  Strange.

I'm not sure I believe these numbers at all... my experience is that
getting trustworthy disk I/O numbers is *not* easy.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: fsync method checking
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: fsync method checking