This page has been moved, the new location is Improved Buffer Pool Scalability.

Patch: innodb_split_buffer_pool_mutex

This patch splits the single global InnoDB buffer pool mutex into several mutexes for different purposes. This reduces mutex contention. It may help if you suffer performance loss when the working set does not fit in memory. You can detect buffer pool mutex contention by examining the output of SHOW INNODB STATUS and looking at the first section, SEMAPHORES.

The following mutexes are added:

The original buf_pool→mutex is still present, but it is no longer a single bottleneck for every buffer pool operation. It is used when one of the other mutexes cannot be used instead.

The patch also improves performance and reduces contention by removing some unnecessary mutex waits. InnoDB tries to keep a reserve of free-able blocks in some cases, and flushes the blocks only if needed. But except for the specific case of buf_LRU_get_free_block(), there is no need to wait for the flush I/O to complete, because it is not urgent. This patch skips the useless waiting and permits InnoDB to continue working without interruption.

The patch also makes InnoDB's LRU-list operations optimistic for better performance. InnoDB by default locks the entire LRU list while counting free-able blocks, and while finding and freeing them. This process is executed often and in parallel, and it is a bottleneck in some cases. This patch changes InnoDB's behavior so it doesn't lock the whole LRU list, and uses an optimistic strategy instead – it locks the LRU only if needed.

Patch Information

License BSD
Author/Origin Yasufumi Kinoshita
Bugs fixed http://bugs.mysql.com/bug.php?id=29413
Dependencies