Unnecessary log_sys->mutex reacquisition in mtr_log_reserve_and_write()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
|||
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Medium
|
Alexey Kopytov | ||
5.1 |
Won't Fix
|
Undecided
|
Unassigned | ||
5.5 |
Fix Released
|
Medium
|
Alexey Kopytov | ||
5.6 |
Fix Released
|
Medium
|
Alexey Kopytov |
Bug Description
mtr_log_
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,
log_reserve_
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.
Related branches
- Laurynas Biveinis (community): Approve
-
Diff: 146 lines (+43/-14)4 files modifiedPercona-Server/storage/innobase/include/log0log.h (+12/-4)
Percona-Server/storage/innobase/include/log0log.ic (+19/-4)
Percona-Server/storage/innobase/log/log0log.c (+9/-5)
Percona-Server/storage/innobase/mtr/mtr0mtr.c (+3/-1)
- Laurynas Biveinis (community): Approve
-
Diff: 137 lines (+41/-14)4 files modifiedPercona-Server/storage/innobase/include/log0log.h (+12/-4)
Percona-Server/storage/innobase/include/log0log.ic (+19/-4)
Percona-Server/storage/innobase/log/log0log.cc (+7/-5)
Percona-Server/storage/innobase/mtr/mtr0mtr.cc (+3/-1)
tags: | added: xtradb |
The exact same reasoning applies to the upstream, but there is no upstream bug ref. Is that intentional?