MySQL Transactions Per Second vs. fsyncs Per Second: Unraveling the Mystery
2025-03-21
This article investigates the discrepancy between the theoretical and actual transaction throughput of MySQL. A benchmark reveals MySQL's write speed is significantly faster than theoretically predicted (based on fsync() latency). Further investigation uncovered that MySQL uses group commit to batch writes to the WAL and binlog, and the file system/disk likely employs similar batching, boosting efficiency. The author also analyzes inverted index performance and explains the gap between theoretical models and real-world performance.
Development