Delete comment from: MySQL Musings
I like your implementation and the work done by Kristian. Both are definite improvements over what we have in the FB patch. I rewrote the FB version because it was broken in regards to the order it preserved and while doing performance testing I first had a parameter to control how long a transaction might wait for group commit.
And then I added fancy algorithms for dynamically adjusting that based on the observed latency of fsync and the recent commit rate. The hard problem to solve is avoiding waiting when there is little concurrency in the system. Otherwise a workload with one connection loading a lot of data will get very slow as each commit waits for the group commit timeout?
How do you avoid this problem?
In the yet to be published version in the FB patch I replaced the timeout with a simple rule. When a transaction is about to call log_xid() it determines the number of sessions that entered ha_commit_trans after it did. If there are more than X, than it will wait a short amount of time.
Kristian has a different solution that also avoids the group commit timeout.
Jul 29, 2011, 10:39:30 AM
Posted to Binlog Group Commit Experiments