Databases · MariaDB / MySQL
InnoDB Buffer Pool
Cheat sheet · https://pcornel.dk/topic.php?topic=6176
Answer
The InnoDB buffer pool caches data and index pages in memory; most MySQL/MariaDB performance depends on it fitting the working set.
Remember
On a dedicated server set innodb_buffer_pool_size to about 60–75 % of RAM. Hit rate = 1 − reads/read_requests. Resizable online in recent versions.
First checks
SHOW VARIABLES LIKE 'innodb_buffer_pool_size';— first check for this topicpsql -c "SELECT now(), version();"— PostgreSQL reachable and versionmysql -e "SELECT NOW(), VERSION();"— MariaDB/MySQL reachable and versionsqlcmd -S <server> -Q "SELECT @@VERSION"— SQL Server reachable and version
Verify in this order
query → page in buffer pool? → else read from disk → cached
Where it usually breaks
A buffer pool larger than free RAM causes swapping and very slow queries.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6176