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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers