June 20, 2013

Post: Understand InnoDB spin waits, win a Percona Live ticket

… STATUS mean? Mutex spin waits 5870888, rounds 19812448, OS waits 375285 To understand this text, you have to understand how InnoDB handles mutexes. It tries…. Mutex spin waits 5870888 is the number of times a thread tried to get a mutex and it wasn’t available, so it waited in a spin-wait. rounds 19812448 is the number of times threads looped in the spin-wait cycle, checking the mutex. OS waits 375285 is…

Post: SHOW INNODB STATUS walk through

…: Mutex at 0x2a957858b8 created file buf0buf.c line 517, lock var 0 waiters flag 0 wait is ending Mutex spin waits 5672442, rounds 3899888, OS waits 4719 RW-shared spins 5920, OS waits 2918; RW-excl spins 3463, OS waits 3163 There…

Post: kernel_mutex problem. Or double throughput with single variable

… kernel_mutex (and all InnoDB mutexes) has complex handling with spin loops, and there are two variables that affects mutex loops: innodb_sync_spin_loops and innodb_spin_wait_delay…

Comment: Understand InnoDB spin waits, win a Percona Live ticket

…: Mutex spin waits: is the number of times a thread tried to get a mutex and it wasn’t available, so it waited in a spin-wait. Rounds: is the number of times threads looped in the spin-wait cycle, checking the mutex. Then you…

Post: Scaling problems still exist in MySQL 5.5 and Percona Server 5.5

… mysqld btr_search_guess_on_hash 716506 12.4800 mysqld mutex_spin_wait 467974 8.1511 mysqld rec_get_offsets_func 376898 6…,clone 5 pthread_cond_wait,os_cond_wait,os_event_wait_low,sync_array_wait_event,rw_lock_s_lock_spin,pfs_rw_lock_s…_cond_wait,os_cond_wait,os_event_wait_low,sync_array_wait_event,mutex_spin_wait,mutex_enter_func,pfs_mute x_enter_func,buf_page_get_mutex_enter…

Post: Helgrinding MySQL with InnoDB for Synchronisation Errors, Fun and Profit

… write of size 8 by thread #1 ==9090==    at 0x6BC9FFF: mutex_spin_wait (sync0sync.c:441) ==9090==    by 0x6B751FC: mtr_commit (sync0sync.ic… is between the reads and writes of mutex_t::waiters in mutex_get_waiters and mutex_set_waiters. Interestingly, there are comments next…, so that there is no need for workarounds in mutex_get_waiters/mutex_set_waiters above and similar cases. And then Helgrind…

Post: The perils of InnoDB with Debian and startup scripts

… 1624 Mutex spin waits 0, rounds 5023577, OS waits 24953 RW-shared spins 34364070, OS waits 33800501; RW-excl spins 5756394, OS waits 5297208 Everyone is waiting for mutexes, and they are all waiting for…

Comment: SHOW INNODB STATUS walk through

WAIT ARRAY INFO: reservation count 866195, signal count 850669 Mutex spin waits 7873759, rounds 34666553, OS waits 328525 RW-shared spins 178137, OS waits 79292; RW-excl spins 259415, OS waits 230381 I’ve both spin waits and OS waits

Comment: SHOW INNODB STATUS walk through

WAIT ARRAY INFO: reservation count 50573942, signal count 48103669 Mutex spin waits 0, rounds 1286836814, OS waits 29544296 RW-shared spins 17771305, OS waits 8349871; RW-excl spins 10508828, OS waits 5276204 Currently I have innodb_sync_spin

Post: Internals of InnoDB mutexes

mutex (schematic for simplification): spin_loop: for (i=0; i< innodb_spin_locks;i++) if (mutex_try_lock()) return; // success // we are here if spin loop was not successful reserve_cell in array of cell; wait on…. Spin-loop – InnoDB uses spin-loop in hopes thread locked mutex is very fast and will release mutex while current thread runs in spins, so…