MySQL/Innodb Scaling Limitation - lock_table()


I am running sysbench on mysql5.0.37/solaris10/SunFireT2000 system and noticed the scaling limitation of mysql after #32 user connections and degradation in tps if more user connections are added.

The analysis of %user time of different functions of mysql showed the hot stack to be,
mysqldut_delay mysqldmutex_spin_wait+0xac
mysqldmutex_enter_func+0x3c mysqldlock_table+0x15c

Then I looked into the code of lock_table which calls lock_mutex_enter() which tries to get global lock and if it is not available, spins for it using mutex_spin_wait() which is implemented through ut_delay().

This looks to be an obvious scaling limitation if its trying to grab a system wide lock. As more users are added this won’t scale.

Is my observation correct? Is it observed already?

Let me know if any more information is needed from my side to understand this behaviour and root cause this scaling limitation

Appreciate your time and understanding.