Bug #58766 Server binary was compiled without fast-mutexes
Submitted: 6 Dec 2010 22:48 Modified: 29 Jan 2014 0:51
Reporter: Alexey Stroganov Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.5.8 OS:Any (Linux)
Assigned to: Assigned Account CPU Architecture:Any
Triage: Needs Triage: R6 (Needs Assessment) / E6 (Needs Assessment)

[6 Dec 2010 22:48] Alexey Stroganov
Description:
Analyzing some performance regressions I found out that in transition from builds based on autotools to builds based on CMake we have missed --with-fast-mutex option/WITH_FAST_MUTEXES feature. It was enabled in 5.5.4 and was disabled 

I've checked symbols that exist only when WITH_FAST_MUTEXES is enabled:

5.1.53-release
$ nm bin64_5153/bin/mysqld | grep my_pthread_fastmutex_init 
00000000008bab60 T my_pthread_fastmutex_init

5.5.8-release
$ nm bin64_558/bin/mysqld | grep my_pthread_fastmutex_init

5.5.8-release-sources rebuilt WITH_FAST_MUTEXES
$ nm mysql-5.5.8/sql/mysqld | grep my_pthread_fastmutex_init
00000000009226d0 T my_pthread_fastmutex_init

Is that change accidental or there is some decision behind that?

 

How to repeat:
Check build configs/results symbols for fast-mutex feature.
[7 Dec 2010 11:43] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/126190

3169 Jonathan Perkin	2010-12-07
      bug#58766: Server binary was compiled without fast-mutexes
      
      Re-enable fast mutexes on Linux for release builds.
[7 Dec 2010 11:50] Davi Arnaut
I suggest holding on this a bit, the performance implications are not clear.
[7 Dec 2010 11:57] Davi Arnaut
I've run some trace data and the the  "fast" mutexes only help a bit in the very contented cases where the lock is hold for somewhat large periods, but it causes a equivalent slowdown for cases where the lock is held for brief periods. This happens because of the way it spins on the lock, which is somewhat long and does not adapt to the lock. If the lock is being held for long periods, it helps a bit because the contention on the lock will be reduced. If the lock is held for brief periods, it will cause a slowdown because it will spin while the lock could have been acquired.
[17 Dec 2010 12:53] Bugs System
Pushed into mysql-5.5 5.5.9 (revid:georgi.kodinov@oracle.com-20101217124733-p1ivu6higouawv8l) (version source revid:jonathan.perkin@oracle.com-20101207114038-af8vvh6e3cx9x1sx) (merge vers: 5.5.8) (pib:24)
[17 Dec 2010 12:57] Bugs System
Pushed into mysql-trunk 5.6.1 (revid:georgi.kodinov@oracle.com-20101217125013-y8pb3az32rtbplc9) (version source revid:anitha.gopi@sun.com-20101210041312-50t9adyhwwybsm6x) (merge vers: 5.6.1) (pib:24)
[29 Jan 2014 0:51] Paul Dubois
Noted in 5.5.9 changelog.

Release builds on Linux now are compiled with WITH_FAST_MUTEXES
enabled.