Log tracking should not acquire log mutex for log reading

Bug #1171699 reported by Laurynas Biveinis on 2013-04-23
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server
Laurynas Biveinis
Laurynas Biveinis
Laurynas Biveinis
Laurynas Biveinis

Bug Description

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

 log_group_read_log_seg(LOG_RECOVER, log_bmp_sys->read_buf,
          group, block_start_lsn, block_end_lsn);

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.

Related branches

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