Unnecessary log_sys->mutex reacquisition in mtr_log_reserve_and_write()
|Percona Server||Status tracked in 5.6|
to log_sys->mutex: if the mini-transaction log contains a single block,
it calls log_reserve_
does a "fast" write by appending the new record to the current log
block. If the record does not fit in the current log block,
which case mtr_log_
log_sys->mutex by calling log_reserve_
"slow" write procedure.
It doesn't make sense to release a mutex and reacquire it immediately
and benchmarks show that avoiding this helps to reduce log_sys->mutex
contention in some write-intensive workloads.
|Alexey Kopytov (akopytov) wrote : Re: [Bug 1163439] Re: Unnecessary log_sys->mutex reacquisition in mtr_log_reserve_and_write()||#2|