Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In MySQL 5.1 there was the --with-fast-mutexes configure flag used almost everywhere in custom builds.
Currently, the documentation for MySQL 5.5 (here) says nothing about WITH_FAST_MUTEXES, but cmake . -LAH reports it to be there and disabled by default:

    // Compile with fast mutexes

So, my question: what's the fate and the importance of WITH_FAST_MUTEXES in MySQL 5.5? Is it just a hidden option that could be enabled? does it add any performance improvements? or is it just a zombie option good for nothing/ignored?

share|improve this question
up vote 0 down vote accepted

According to mysql bug 58766 ( )

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.

So it appears that it's very dependent on your specific query load. That said, it appears that as of 5.5.9/5.6.1 it's enabled on's binary linux builds.

share|improve this answer
So, shortly one could say: WITH_FAST_MUTEXES is a valid option, but missing from docs (probably without intention); by default it's OFF and can be enabled; it's performance impact is negligible in the vast majority of the cases; it could help just in some edge situations, but also be harmful in others. – ArtM Feb 15 '13 at 23:53
That's exactly it. – kormoc Feb 16 '13 at 0:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.