…readblogpercona.commanual Innodb_rows_updatedblogpercona.commanual innodb_spin_wait_delayblogpercona.commanual innodb_stats_on_metadatablogpercona…._instancesblogpercona.commanual Performance_schema_mutex_classes_lostblogpercona.commanual Performance_schema_mutex_instances_lostblogpercona.commanual …
Comment: Returning to InnoDB scalability
….conf . For the SHOW MUTEX STATUS output , here you go :: mysql> SHOW MUTEX STATUS ; +—————————+————-+————–+————+————-+———-+———–+—————+ | Mutex | Module | Count | Spin_waits | Spin_rounds | OS_waits | OS_yields | OS_waits_time…
Comment: Returning to InnoDB scalability
…| Spin_waits | Spin_rounds | OS_waits | OS_yields | OS_waits_time | +——————————–+————-+————–+————+————-+———-+———–+—————+ | &(trx->undo_mutex) | trx0trx.c | 11097787 | 0 | 0 | 0 | 0 | 0 | | &(table->autoinc_mutex) | dict0mem…
Post: kernel_mutex problem cont. Or triple your throughput
… with kernel_mutex problem. First, I may have an explanation why the performance degrades to significantly and why innodb_sync_spin_loops… uses pthread_cond_wait / pthread_cond_broadcast construction, and on pthread_cond_broadcast call, all threads, competing on mutex, wake up and… So innodb_thread_concurrency is even more helpful innodb_sync_spin_loops, and allows to get stable result even with 1024…
Comment: kernel_mutex problem. Or double throughput with single variable
… to innodb_sync_spin_loops: try acquire mutex; i++; sleep(rand_time); if mutex is not granted: pthread_cond_wait() goto: spin_loop; } mutex_exit: { pthread_cond_broadcast() } That is all threads in random order comes to pthread_cond_wait, but once mutex…
Comment: kernel_mutex problem. Or double throughput with single variable
… sense to wait. For example if we run long spin and can discover we either get the mutex after 10us of we spin till the end of time of 1000us we can decide to spin up to 20us or so which will deal with short locks of given mutex and switch to OS wait and…
Comment: kernel_mutex problem. Or double throughput with single variable
…) threads, waiting on mutex, wake up all together at the same moment and trying to compete for mutex again. Increasing innodb_sync_spin_loops allows to delay entering into using condition variables, and allows to resolve mutex only via spin…
Post: How Innodb Contention may manifest itself
… MySQL 5.5, there are still workloads in which case mutex (or rw-lock) contention is a performance limiting factor, helped… many cases busy wait is indeed more efficient than doing context switches, however sometimes there is just too much spinning and it becomes inefficient. Reducing innodb_sync_spin_loops variable to smaller values is known…
Comment: kernel_mutex problem. Or double throughput with single variable
… to SPIN LOOP Yes, but one important point, InnoDB only uses pthread synchronization objects to implement the wait queue of an InnoDB mutex. When the threads are on the wait queue, only one will be actually woken and this one grabs the _wait queue…
Post: MySQL 5.0, 5.1 and Innodb Plugin CPU Efficiency
…. You can have 2 cases when waiting on mutexes and other synchronization objects – either everything waits so there is not enough runnable threads to cause full CPU usage, or you may be waiting by spinning on the spinlock wasting CPU cycles. Detailed profiling tells…

