May 24, 2012

Post: kernel_mutex problem. Or double throughput with single variable

… ALL active transactions, and this loop is inside kernel_mutex. That is to see kernel_mutex in action, we need many concurrent but short….c line 1184 for 0.0000 seconds the semaphore: Mutex at 0x2b0ccc8 ‘&kernel_mutex‘, lock var 1 waiters flag 0 –Thread 140370752542464 has… recall that kernel_mutex (and all InnoDB mutexes) has complex handling with spin loops, and there are two variables that affects mutex loops: innodb…

Post: kernel_mutex problem cont. Or triple your throughput

This is to follow up my previous post with kernel_mutex problem. First, I may have an explanation why the performance … the performance degradation is following: InnoDB still uses some strange mutex implementation, based on sync_arrays (hello 1990ies), I do not…, and on pthread_cond_broadcast call, all threads, competing on mutex, wake up and start racing. This effect has name thundering…

Comment: Returning to InnoDB scalability

…_monitor_mutex | srv0srv.c | 21679 | 8 | 80 | 4 | 4 | 0 | | &kernel_mutex | srv0srv.c | 931679981 | 51334 | 347827 | 10652 | 13328 | 0 | | &thr_local_mutex | thr0loc…_monitor_mutex | srv0srv.c | 5913 | 2 | 20 | 1 | 1 | 0 | | &kernel_mutex | srv0srv.c | 512322207 | 3876530 | 19052043 | 148193 | 266380 | 0 | | &thr_local_mutex | thr0loc…

Comment: Returning to InnoDB scalability

…_monitor_mutex | srv0srv.c | 57877 | 0 | 0 | 0 | 0 | 0 | | &kernel_mutex | srv0srv.c | 8326330740 | 17826281 | 130886065 | 1071867 | 2746135 | 0 | | &thr_local_mutex | thr0loc.c | 811915 | 0 | 0 | 0 | 0 | 0 | | &(pool->mutex) | mem0pool…

Comment: Returning to InnoDB scalability

…_monitor_mutex | srv0srv.c | 5757 | 0 | 0 | 0 | 0 | 0 | | &kernel_mutex | srv0srv.c | 778621669 | 2111798 | 14420357 | 122435 | 306187 | 0 | | &thr_local_mutex | thr0loc.c | 78340 | 0 | 0 | 0 | 0 | 0 | | &(pool->mutex) | mem0pool…

Post: Tuning for heavy writing workloads

…” in the graph is the perfomance. We can confirm the mutex/lock contention roughly by the SEMAPHORES sction of SHOW INNODB….c line 167″ may be remarkable (it is rseg->mutex). The mutex is for each rollback segments, so we can increase the… next contention may be “Mutex at 0x28ce8e0 created file srv/srv0srv.c line 982″. It is kernel_mutex, currently we don’t have…

Comment: Three ways that the poor man's profiler can hurt MySQL

…/kernel_mutex-problem-or-double-throughput-with-single-variable/ by the way, Vadim and I discussed and he did some followup work. kernel_mutex

Comment: kernel_mutex problem cont. Or triple your throughput

… is about to be correctly identified. Maybe it is not kernel_mutex that hurts Innodb. Maybe it is sync_array (protected by… just not to access the variable, avoiding entering sync_array mutex as long as possible, pthread conditions and wakeups. At some…, all this needs to be replaced with a single pthread_mutex_timedlock() – (I believe timed is needed to handle deadlocks) on…

Comment: kernel_mutex problem. Or double throughput with single variable

Raghavendra, Removing kernel_mutex does not automatically fixes problem, as you will face another mutex after that. So I would wait on the results before saying that problem is fixed.

Comment: Performance problem with Innodb and DROP TABLE

….5 does have metadata locking which will eliminate holding of mutexes but invalidating buffer pool pages may still take some time… performance for you. MySQL 5.5 will still hold the kernel mutex during a drop, but this is fixed in trunk. You…