Percona Server with XtraDB

Log tracking should not acquire log mutex for log reading

Reported by Laurynas Biveinis on 2013-04-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Status tracked in 5.6
5.1
Medium
Laurynas Biveinis
5.5
Medium
Laurynas Biveinis
5.6
Medium
Laurynas Biveinis

Bug Description

The log tracker thread reads the log in log block size chunks by doing

 mutex_enter(&log_sys->mutex);
 log_group_read_log_seg(LOG_RECOVER, log_bmp_sys->read_buf,
          group, block_start_lsn, block_end_lsn);
 mutex_exit(&log_sys->mutex);

This code allows reusing log_group_read_log_seg(), which requires that log_sys mutex is being held, without any changes, but there is no reason to hold the mutex for the I/O itself.

tags: added: xtradb

A preliminary fix that does not hold the mutex during the log read fixes a performance regression of some 30% on a Sysbench write-only workload and makes its performance ~match the case of log tracking disabled.

This fix still acquires the mutex for the log_group_calc_lsn_offset() call, which does not seem necessary neither, but removing that seems to be 1) more involved; 2) not that urgent now.

tags: added: bitmap
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers