Bug #52806 Make InnoDB mutexes green

Submitted: 14 Apr 2010 6:32 Modified: 6 May 2024 13:49
Reporter: Mark Callaghan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB Plugin storage engine Severity:S5 (Performance)
Version:5.1 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: green, innodb, mutex

[14 Apr 2010 6:32] Mark Callaghan
Description:
The InnoDB mutex wakes all waiting threads on unlock. This wastes CPU power as only 1 threads can get the lock. NPTL mutex code wakes one thread using futex calls -- read the glibc source. I know InnoDB can do something similar. I even hacked up a change to do this and produced sysbench numbers that match performance without the change while cutting CPU consumption in half.

How to repeat:
Run a test with a lot of mutex contention

Suggested fix:
Wake one thread instead of all threads.
[26 Jan 2022 12:34] Shane Bester
This was fixed in WL#6044 and pushed to 5.7.2. By using futexes on Linux we
can replace the condition variable broadcast with a "signal".

This bug should be closed.
[6 May 2024 13:49] Mark Callaghan
Thank you for the fix.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.062 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.