// mysql · memory

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.

// one client for every engine

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.