innodb_buffer_pool_instances
Number of separate regions the buffer pool is split into.
- 기본값
1 (computed)- Range
- 1 to 64
- Restart needed
- 예
- Default checked on
- MySQL 8.4 LTS
기능
Each instance has its own mutex and LRU list, which reduces contention when many threads read pages concurrently.
기본값
1 (computed). Computed at startup. Before MySQL 8.4 it was 8, or 1 when the pool is under 1GB; 8.4 derives it from the pool size and the number of logical processors. The 128MB default pool gives 1.
Check the current value
SHOW GLOBAL VARIABLES LIKE 'innodb_buffer_pool_instances'; SELECT VARIABLE_NAME, VARIABLE_SOURCE, MIN_VALUE, MAX_VALUE, SET_TIME FROM performance_schema.variables_info WHERE VARIABLE_NAME = 'innodb_buffer_pool_instances';
Change it
SET PERSIST_ONLY innodb_buffer_pool_instances = 8; -- then restart mysqld (or set it under [mysqld] in my.cnf)
Restart required: the variable is read-only at runtime (SET GLOBAL fails with error 1238). Stage it with SET PERSIST_ONLY or under [mysqld] in my.cnf.
When to change it
Rarely needed in 8.4, where the computed value tracks the hardware. Set it explicitly only if you see buffer pool mutex contention.
What can go wrong
Each instance should be at least 1GB; many small instances waste memory on per-instance overhead.
Questions about innodb_buffer_pool_instances
What is the default value of innodb_buffer_pool_instances in MySQL?
1 (computed). Computed at startup. Before MySQL 8.4 it was 8, or 1 when the pool is under 1GB; 8.4 derives it from the pool size and the number of logical processors. The 128MB default pool gives 1.
Does changing innodb_buffer_pool_instances require a restart?
Yes. Restart required: the variable is read-only at runtime (SET GLOBAL fails with error 1238). Stage it with SET PERSIST_ONLY or under [mysqld] in my.cnf.
When should I change innodb_buffer_pool_instances?
Rarely needed in 8.4, where the computed value tracks the hardware. Set it explicitly only if you see buffer pool mutex contention.
Back to all MySQL settings, or check the MySQL manual for every option.
Check innodb_buffer_pool_instances on your own server
SQLly runs the query above against MySQL and the other engines in this reference, from one desktop app on macOS, Windows and Linux.