The idea is borrowed from RocksDB bytes_per_sync. It uses sync_file_range1 that allows asynchronously incrementally sync files to disk while they are being written.
It smoothes out write I/Os over time and reduce fdatasync latency spike as we saw in #346 (comment) .
Note: The feature proposed here is different from the deprecated bytes_per_sync feature which sync file synchronously.
The idea is borrowed from RocksDB
bytes_per_sync. It usessync_file_range1 that allows asynchronously incrementally sync files to disk while they are being written.It smoothes out write I/Os over time and reduce
fdatasynclatency spike as we saw in #346 (comment) .Note: The feature proposed here is different from the deprecated
bytes_per_syncfeature which sync file synchronously.Footnotes
https://man7.org/linux/man-pages/man2/sync_file_range.2.html ↩