innodb_buffer_pool_size
Size of InnoDB's cache for table and index pages.
- 기본값
128MB- Range
- 5MB up to the 64-bit address limit
- Restart needed
- 아니요
- Default checked on
- MySQL 8.4 LTS
기능
The most important MySQL setting. InnoDB does its own caching (with O_DIRECT it bypasses the OS cache), so on a dedicated server the buffer pool is usually most of RAM. It can be resized online; the size is rounded to a multiple of innodb_buffer_pool_chunk_size x innodb_buffer_pool_instances.
기본값
128MB. 134217728 bytes, 128MB (MySQL 8.4). With innodb_dedicated_server=ON it is sized from RAM instead.
Check the current value
SHOW GLOBAL VARIABLES LIKE 'innodb_buffer_pool_size'; SELECT VARIABLE_NAME, VARIABLE_SOURCE, MIN_VALUE, MAX_VALUE, SET_TIME FROM performance_schema.variables_info WHERE VARIABLE_NAME = 'innodb_buffer_pool_size';
Change it
SET GLOBAL innodb_buffer_pool_size = 8589934592; -- until the next restart SET PERSIST innodb_buffer_pool_size = 8589934592; -- now and after restarts
No restart. SET GLOBAL or SET PERSIST takes effect immediately; SET PERSIST also writes mysqld-auto.cnf so the value survives restarts.
When to change it
Always, on a dedicated server: start around 70-80% of RAM and check Innodb_buffer_pool_reads (disk reads) against Innodb_buffer_pool_read_requests.
What can go wrong
Too large and the OS swaps or the OOM killer stops mysqld; leave room for per-connection buffers and the OS. An online resize briefly blocks while chunks are added or removed.
The closest setting on other engines
| 엔진 | 설정 | 기본값 | Restart |
|---|---|---|---|
| MySQL |
innodb_buffer_pool_size this page
|
128MB |
아니요 |
| PostgreSQL |
shared_buffers
|
128MB |
예 |
| SQL Server |
max server memory (MB)
|
2147483647 |
아니요 |
| Oracle |
sga_target
|
0 |
아니요 |
| SQLite |
cache_size
|
-2000 (about 2MB) |
아니요 |
Questions about innodb_buffer_pool_size
What is the default value of innodb_buffer_pool_size in MySQL?
128MB. 134217728 bytes, 128MB (MySQL 8.4). With innodb_dedicated_server=ON it is sized from RAM instead.
Does changing innodb_buffer_pool_size require a restart?
No. No restart. SET GLOBAL or SET PERSIST takes effect immediately; SET PERSIST also writes mysqld-auto.cnf so the value survives restarts.
When should I change innodb_buffer_pool_size?
Always, on a dedicated server: start around 70-80% of RAM and check Innodb_buffer_pool_reads (disk reads) against Innodb_buffer_pool_read_requests.
Back to all MySQL settings, or check the MySQL manual for every option.
Check innodb_buffer_pool_size 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.