Tuning innodb_buffer_pool_instances variable

Basic Details

The innodb_buffer_pool_instances variable sets how many instances the InnoDB buffer pool will be divided into.

Releem automatically tunes innodb_buffer_pool_instances and 44 other variables to improve MySQL performance. Try Releem for Free, or deepen your understanding by reading our detailed article.


The innodb_buffer_pool_instances variable is closely related innodb_buffer_pool_size and innodb_buffer_pool_chunk_size. When innodb_buffer_pool_size is over 1GB, then the value of this variable sets the number of instances within the InnoDB buffer pool.

As a reminder, the InnoDB buffer pool caches your most recently accessed data, keeping it in memory to retrieve it from the memory instead of the disk. The innodb_buffer_pool_size has a strong effect on I/O usage. The buffer pool can then be separated into small sections known as instances. And finally, instances can be broken into further sections called chunks.


The innodb_buffer_pool_instances system variable can be configured using the configuration file:

Configuration File:
innodb_buffer_pool_instances = XX

Replace XX with value to suit your database needs. Must restart MySQL server to see changes applied.


The reason to break the InnoDB buffer pool into instances is straightforward. By dividing the buffer pool, concurrency is improved so there is less contention between threads. Every instance takes an equal section of the buffer pool, so if innodb_buffer_pool_size is set to 8GB and innodb_buffer_pool_instances is set to 4, then each instance is 2GB. Ideally, each instance should be a minimum of 1GB in size.

This innodb_buffer_pool_instances variable is depreciated in MariaDB 10.5.1 and completely removed from MariaDB 10.6.0 on, as there are no longer any good reasons to split the buffer pool.

In general, when setting innodb_buffer_pool_instances, it's a good idea to match the maximum number of MySQL threads that will be running simultaneously. It's also important to recognize that setting innodb_buffer_pool_instances too low will cause threads to get stuck and latency will skyrocket.
If you're not sure where to get started with setting innodb_buffer_pool_instances, innodb_buffer_pool_size, or innodb_buffer_pool_chunk_size, rest easy known Releem can handle that.

Releem Agent will collect metrics and important system information that is transferred to the Releem Cloud Platform. Releem Cloud Platform will calculate MySQL Performance Score and improve your server performance with its recommended configuration. Releem can automatically apply these settings, including any recommendations for innodb_buffer_pool_instances, innodb_buffer_pool_size, or innodb_buffer_pool_chunk_size.
Releem automatically detects MySQL performance degradation and optimizes MySQL configuration files