Search code examples
mysqlamazon-web-servicesamazon-aurora

When is the mysql performance schema event "wait/synch/cond/sql/MYSQL_BIN_LOG::COND_done" fired?


I am using Aurora Mysql 5.7.mysql_aurora.2.07.2 and am facing bottlenecks on load testing with a write-heavy workload. On enabling performance insights I noticed that a large number of sessions were waiting on the event wait/synch/cond/sql/MYSQL_BIN_LOG::COND_done.

After going through the AWS documentation, I figured that this is caused by large number of commits which is the case in my codebase but the explanation is generic in nature for all the wait/synch/*/sql/MYSQL_BIN_LOG events and nowhere in Mysql's or Aurora's documentation I could find the exact situation in which the particular COND_DONE event is fired.


Solution

  • Here's what it says in the docs - this is a relatively new section all about tuning with wait events:

    https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Reference.Waitevents.html

    "synch/cond/sql/MYSQL_BIN_LOG::COND_done - You have turned on binary logging. There might be a high commit throughput, large number transactions committing, or replicas reading binlogs. Consider using multirow statements or bundling statements into one transaction. In Aurora, use global databases instead of binary log replication, or use the aurora_binlog_* parameters."