-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
log: use fdatasync instead of fsync where possible
Using years-old benchmark attached to PostreSQL ML[1], I've observed tiny bit more than double boost in speed when using fdatasync instead of traditional fsync, on two Linux machines, each equipped with an SSD. While the observation may be disputable (there are various interpretations to what "synchronized I/O" actually means), by logical extension of what the two are supposed to do, one can expect fdatasync will perform no worse than fsync. Having the timestamps correct is really not a priority, compared to timely processing of the message stream. So let's use it whenever possible with QB_LOG_CONF_FILE_SYNC requested. [1] https://www.postgresql.org/message-id/[email protected] https://www.postgresql.org/message-id/attachment/20659/syncbench.c Signed-off-by: Jan Pokorný <[email protected]>
- Loading branch information
Showing
2 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters