innodb_buffer_pool_size
WARNING (2 rules)INFOOK
Rule IDs: bp_001, bp_002, bp_003, bp_008
Overview
- Purpose
- Documented in the MySQL 8.4 manual as a server system variable (scope: Global). Purpose and semantics are described at the linked manual page.
- Dynamic (MySQL 8.4 reference)
- MySQL 8.4 marks this variable as dynamic (
Dynamic= Yes). Runtime changes useSET GLOBAL(global scope) orSET SESSION(session scope) — confirm syntax and persistence (SET PERSIST) in the manual. - Default value
- 128 MB (134217728) (MySQL 8.4)
- Version and product notes
- MariaDB and Percona Server may use different names, defaults, or dynamic behavior; verify their documentation.
- Documentation
- https://dev.mysql.com/doc/refman/8.4/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size
- Other vendors
What is checked
Rules that reference this variable, with their severity and what each rule detects:
- WARNING
bp_001: Consider increasing innodb_buffer_pool_size. Aim for 60-80% of available RAM on a dedicated MySQL server. - WARNING
bp_002: On a dedicated MySQL server, allocate 60-80% of physical RAM to innodb_buffer_pool_size. Start at ~66% if unsure about resource usage. - INFO
bp_003: If the server is under normal workload, the buffer pool may be larger than needed. Monitor over time before reducing. - OK
bp_008: Positive check — confirms configuration meets expected thresholds.
Tuning guidance
- Recommended actions:
- Consider increasing innodb_buffer_pool_size. Aim for 60-80% of available RAM on a dedicated MySQL server.
- On a dedicated MySQL server, allocate 60-80% of physical RAM to innodb_buffer_pool_size. Start at ~66% if unsure about resource usage.
- If the server is under normal workload, the buffer pool may be larger than needed. Monitor over time before reducing.
- Trade-offs: Larger buffer pools improve hit ratio but consume more RAM and increase restart warm-up time. Over-allocating risks OOM or swap. Under-allocating means more disk I/O.
Example
SET GLOBAL innodb_buffer_pool_size = 8589934592; -- 8 GB
-- Or in my.cnf: innodb_buffer_pool_size = 8G
Always validate on a non-production instance first. Use SET PERSIST (MySQL 8.0+) for changes that should survive restarts.