SyntaxStudy
Sign Up
MySQL Buffer Pool and InnoDB Caching
MySQL Intermediate 4 min read

Buffer Pool and InnoDB Caching

InnoDB Buffer Pool

InnoDB caches table data and indexes in the buffer pool. A large buffer pool reduces disk I/O. Set innodb_buffer_pool_size to ~70-80% of available RAM on dedicated servers.

Example
-- Check buffer pool usage
SHOW STATUS LIKE 'Innodb_buffer_pool%';

-- Check hit ratio (should be > 99%)
-- Hit ratio = Innodb_buffer_pool_read_requests /
--             (Innodb_buffer_pool_read_requests + Innodb_buffer_pool_reads)

-- Set in my.cnf
-- innodb_buffer_pool_size = 4G
Pro Tip

A buffer pool hit ratio below 99% means you need more RAM or a larger pool.