Bug #43426 Simple performance changes for replication
Submitted: 5 Mar 2009 16:59 Modified: 15 Jan 2014 15:39
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Replication Severity:S5 (Performance)
Version:5.0 OS:Any
Assigned to: Mats Kindahl CPU Architecture:Any
Tags: performance, replication
Triage: Triaged: D5 (Feature request)

[5 Mar 2009 16:59] Mark Callaghan
A few simple changes can be made:

1) Use MY_MUTEX_INIT_FAST instead of MY_MUTEX_INIT_SLOW in log.cc

log.cc:  (void) pthread_mutex_init(&LOCK_log,MY_MUTEX_INIT_SLOW);
log.cc:  (void) pthread_mutex_init(&LOCK_index, MY_MUTEX_INIT_SLOW);

2) Allocate a reasonably large buffer once for each thread on the master that pushes events to a slave. The current code does malloc/free for each event. This change is in the google patch. The my.cnf variable for this is rpl_event_buffer_size

How to repeat:

Suggested fix:
[6 Mar 2009 9:28] Valeriy Kravchuk
Thank you for the reasonable feature request.
[15 Jan 2014 15:39] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at


Fixed by binlog dump thread optimisation work implemented in 5.7.4 (WL#7299). Closed.