Re: FYI: fdatasync vs sync_file_range

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: FYI: fdatasync vs sync_file_range
Дата
Msg-id 4A51CB76.5020407@enterprisedb.com
обсуждение исходный текст
Ответ на FYI: fdatasync vs sync_file_range  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
Fujii Masao wrote:
> According to the result, using sync_file_range instead of fdatasync
> has little effect in the performance of postgres.

When we flush the WAL, we flush everything we've written that far. I'm
not surprised that sync_file_range makes no difference; it does the same
amount of I/O as fsync().

sync_file_range() might be a useful useful replacement for the data file
fsync()s at checkpoint, though. You could avoid the I/O storm that
fsync() causes by flushing the files in smaller chunks with
sync_file_range(), with a small delay in between. But since I don't
recall any complaints about I/O storms at checkpoints since the smoothed
checkpoints patch in 8.3, it might not be worth it.

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: FYI: fdatasync vs sync_file_range
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: First CommitFest: July 15th