Databases 3 min read

Diagnosing Slow Master Commit Performance in MySQL Semi‑Synchronous Replication

This article explains how to identify which slave in a MySQL one‑master‑multiple‑slave semi‑synchronous setup is slowing the master’s commit performance by using debug logging and examining the error log for the last ACK server ID.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Diagnosing Slow Master Commit Performance in MySQL Semi‑Synchronous Replication

Problem: In MySQL semi‑synchronous replication, a slow slave can reduce the master’s commit throughput. When using a one‑master‑multiple‑slave semi‑sync architecture, the question is how to determine which slave is causing the master’s commit slowdown.

Experiment: Using dbdeployer a one‑master‑two‑slave semi‑sync cluster was created. Load was applied to the master, and strace was used to artificially slow down slave 2. Because of the semi‑sync protocol, the throttled slave 2 reduced the master’s commit performance.

Diagnosis: The semi‑sync plugin’s log level was increased to 16, and the master’s error log was examined. The log showed many “semi‑sync block” messages, with the last ACK coming from server_id 300, which corresponds to slave 2. After the investigation the log level was restored.

Conclusion: The semi‑sync plugin does not expose a convenient way to pinpoint the lagging slave, but by enabling detailed debug logging one can see which slave’s ACK is the last to arrive and thus identify the bottleneck. Users should limit the duration of this logging to avoid excessive disk usage.

mysqldatabasesPerformance DiagnosisSemi-synchronous replication
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.