In this recipe, we will be discussing how to benchmark the fsync speed using open source tools.
Fsync is a system call that flushes the data from system buffers into physical files. In PostgreSQL, whenever a CHECKPOINT operation occurs, it internally initiates the fsync, to flush all the modified system buffers into the respective files. The fsync benchmarking defines the transfer ratio of data from memory to the disk.
fsync benchmarking, we can use a dedicated benchmark test called
fs-mark from Phoronix. This
fs-mark test was built based on a filesystem benchmarking tool called
fio, which supports several
fsync test cases. We can run this
fs-mark test case using ...