Suboptimal debug code in mem_init_buf() and mem_erase_buf()
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Low
|
Unassigned | |||
5.5 |
Triaged
|
Low
|
Unassigned | |||
5.6 |
Triaged
|
Low
|
Unassigned | |||
5.7 |
Fix Released
|
Low
|
Unassigned | |||
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
Undecided
|
Laurynas Biveinis | |||
2.0 |
Fix Released
|
Undecided
|
Laurynas Biveinis | |||
2.1 |
Fix Released
|
Undecided
|
Laurynas Biveinis |
Bug Description
Callgrind simulated profiling of compact_compressed testcase on 5.6 debug configuration shows it spending ~56% of its cycles in ut_rnd_gen_ibool(), which is only called from UNIV_MEM_
Both mem_init_buf() and mem_erase_buf() fill the buffer with one of the two possible values, chosen randomly for each individual byte:
for each byte
if (ut_rnd_
} else {
}
This is very inefficient (reported upstream as http://
Thus let's add this to XtraBackup InnoDB patches for improved testcase runtime.
Related branches
- Stewart Smith (community): Approve
- Registry Administrators: Pending requested
-
Diff: 255 lines (+213/-0)5 files modifiedpatches/innodb51.patch (+43/-0)
patches/innodb51_builtin.patch (+41/-0)
patches/innodb55.patch (+43/-0)
patches/xtradb51.patch (+43/-0)
patches/xtradb55.patch (+43/-0)
- Stewart Smith (community): Approve
- Registry Administrators: Pending requested
-
Diff: 203 lines (+172/-0)4 files modifiedpatches/innodb51.patch (+43/-0)
patches/innodb55.patch (+43/-0)
patches/xtradb51.patch (+43/-0)
patches/xtradb55.patch (+43/-0)
- Alexey Kopytov (community): Approve
-
Diff: 50 lines (+43/-0)1 file modifiedpatches/innodb56.patch (+43/-0)
tags: | added: upstream |
A highly unscientific wall time measurement showed the testcase runtime to be reduced from ~1h on compact_compressed testcase to 7min + 8mins for the split compact_ compressed_ 8kb and _16kb.