Re: FYI: fdatasync vs sync_file_range - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: FYI: fdatasync vs sync_file_range
Date
Msg-id 4A51CB76.5020407@enterprisedb.com
Whole thread Raw
In response to FYI: fdatasync vs sync_file_range  (Fujii Masao <masao.fujii@gmail.com>)
List 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 by date:

Previous
From: Simon Riggs
Date:
Subject: Re: FYI: fdatasync vs sync_file_range
Next
From: Bruce Momjian
Date:
Subject: Re: First CommitFest: July 15th