Insights

InnoDB Buffer Pool Hit Ratio Looks Fine but Pages Keep Flushing to Disk? Check the Real Numbers

November 16, 2026
0:00
Your InnoDB buffer pool hit ratio says 99%. Monitoring dashboards green. Yet iostat shows sustained disk writes, query latency creeps up under load, and users complain about slow page loads. The hit ratio is not lying, but it is not telling you the whole story. A high read hit ratio means most data reads come from memory. It says nothing about how aggressively InnoDB is writing dirty pages back to disk, or whether the buffer pool has any free pages left to absorb new data without evicting something first. This article walks through the investigation pattern as a post-mortem: what the symptoms look like, where the standard metric misleads you, what numbers actually matter, and how to fix it.
The pattern typically shows up on busy web databases — WordPress with WooCommerce, forum software, or any application that mixes reads and writes. During peak hours, response times degrade. The database host shows high disk write activity even though the buffer pool hit ratio stays above 99%. A support engineer checking the usual suspects — slow query log, max_connections, table locks — finds nothing obvious. The hit ratio formula looks like this: hit ratio = 1 - (Innodb_buffer_pool_reads / Innodb_buffer_pool_read_requests) Innodb_buffer_pool_reads counts physical disk reads that happened because a page was not in the buffer pool. Innodb_buffer_pool_read_requests counts total logical read requests served from the pool. When the ratio is 99%+, almost every read request finds its page in memory. Good. But this metric only covers reads. It tells you nothing about writes flushing to disk.
The next step is pulling actual buffer pool internals. Two sources give you what you need: SHOW ENGINE INNODB STATUS and INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS (available in MySQL 5.6+ and MariaDB equivalents, though column names may differ slightly between forks). Run this to get the key counters:
SQL
SELECT
  POOL_SIZE,
  FREE_BUFFERS,
  DATABASE_PAGES,
  MODIFIED_DB_PAGES,
  PAGES_MADE_YOUNG,
  HIT_RATE
FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS;
What each column means:
  • POOL_SIZE — total pages allocated to the buffer pool (each page is typically 16 KB).
  • FREE_BUFFERS — pages not currently holding any data. When this hits zero, every new page load forces an eviction.
  • DATABASE_PAGES — pages holding actual data.
  • MODIFIED_DB_PAGES — "dirty pages." These hold data that has been changed in memory but not yet written back to the tablespace files on disk. This is the number most people never check.
  • HIT_RATE — the read hit ratio, expressed per 1000 (so 999 means 99.9%).
The critical discovery: MODIFIED_DB_PAGES is high relative to POOL_SIZE, and FREE_BUFFERS is near zero. When dirty pages pile up, InnoDB must flush them to disk before it can reuse those buffer pool slots. If the flushing rate cannot keep up with the rate new pages get dirtied, InnoDB enters aggressive flushing. In extreme cases, it hits a synchronous checkpoint — transactions stall while InnoDB forces pages to disk. For more on that specific failure mode, see Why Our Database Froze for 42 Seconds: Diagnosing InnoDB Furious Flushing and Redo Log Starvation. You can also check from SHOW ENGINE INNODB STATUS output. Look for the BUFFER POOL AND MEMORY section:
TEXT
-- Illustrative output format (your numbers will differ)
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 1073741824
Buffer pool size   65536
Free buffers       12
Database pages     65420
Modified db pages  31200
Pending reads      0
Pending writes: LRU 0, flush list 48, single page 0
Pages made young 482010, not young 0
In this illustrative example, the pool holds 65536 pages (~1 GB at 16 KB per page). Only 12 free buffers remain. Nearly half the database pages (31200 out of 65420) are dirty. The pool is full, dirty, and under pressure. Pending flush list writes confirm InnoDB is actively pushing pages to disk. Meanwhile, the hit ratio is still 999/1000. Reads are fine. Writes are the problem.
The hit ratio measures cache effectiveness for reads. A web application doing mostly SELECT queries on a dataset that fits in memory will show 99.9% indefinitely. But every INSERT, UPDATE, or DELETE dirties pages in the buffer pool. Those dirty pages must eventually reach disk — that is how InnoDB guarantees durability. InnoDB uses background threads to flush dirty pages at a pace controlled by innodb_io_capacity and innodb_io_capacity_max. When the percentage of dirty pages exceeds innodb_max_dirty_pages_pct (default varies by version — often 75 or 90), flushing becomes more aggressive. When the redo log (write-ahead log) fills up relative to checkpoint age, flushing becomes synchronous and everything stalls. So the scenario is: buffer pool large enough to cache reads, but not large enough (or not flushing fast enough) to handle the write workload without I/O pressure.
Before resizing anything, check whether the flushing rate matches your storage hardware. On a VPS with spinning disks or limited IOPS, the defaults for innodb_io_capacity (typically 200) might be appropriate. On SSD or NVMe storage, that default is far too conservative. Check current values:
SQL
SHOW VARIABLES LIKE 'innodb_io_capacity%';
SHOW VARIABLES LIKE 'innodb_max_dirty_pages_pct%';
If you are on SSD storage and innodb_io_capacity is still 200, raising it to match your disk's actual write throughput lets InnoDB flush dirty pages faster in the background, reducing the chance of synchronous checkpoints. Values depend entirely on your hardware — there is no universal number. Start by checking your disk's sustained write IOPS with a tool like fio or your hosting provider's published specs, then set innodb_io_capacity to roughly 50-75% of that. Lowering innodb_max_dirty_pages_pct (for example, from 75 to 50) forces InnoDB to start flushing earlier, keeping the dirty page count lower at the cost of more constant background I/O. Whether that trade-off helps depends on your workload pattern.
The common guideline — set innodb_buffer_pool_size to 60-80% of total RAM on a dedicated database server — is a starting point, not an answer. On shared hosting or a VPS running a web server, mail, and MySQL together, 60-80% of RAM would starve everything else. The real question: is your working dataset larger than the buffer pool? Check:
  1. Total InnoDB data size on disk: Query INFORMATION_SCHEMA.TABLES to sum up DATA_LENGTH + INDEX_LENGTH for all InnoDB tables. If that total exceeds your buffer pool size, not everything fits in memory. Whether that matters depends on how much of that data is actively queried.
  2. Free buffers over time: If FREE_BUFFERS stays near zero during normal operation (not just peak), the pool is full. Every new page requires evicting an old one. If the evicted page is dirty, it must be flushed first — adding write I/O.
  3. Pages made young vs. not young: In SHOW ENGINE INNODB STATUS, "pages made young" counts pages promoted from the old sublist to the young sublist of the LRU (least recently used) list. A high rate of "not young" pages means full table scans or large queries are touching pages that get evicted before they are reused. This is normal for occasional reports but problematic if constant.
For a deeper walkthrough on determining whether your buffer pool is undersized, see How to Check If the InnoDB Buffer Pool Is Too Small for Your Site's Database. If the data confirms the pool is too small, increase innodb_buffer_pool_size. In MySQL 5.7+ you can resize it online (the server adjusts in chunks), but verify your version supports this before relying on it. On older versions, a restart is required. After resizing, monitor FREE_BUFFERS and MODIFIED_DB_PAGES over a full traffic cycle (at least 24 hours). The goal is not zero dirty pages — dirty pages are normal and expected. The goal is that dirty pages stay well below the threshold that triggers aggressive flushing, and free buffers remain available so evictions do not cascade into write storms.
The buffer pool hit ratio is a read metric. Treating it as a general health indicator hides write-side pressure. When disk I/O stays high despite a 99% hit ratio, check three things: free buffers remaining, dirty page count relative to pool size, and whether innodb_io_capacity matches your actual storage. The fix is usually a combination of right-sizing the pool and tuning flush aggressiveness — not blindly adding RAM until the ratio hits 100%.

Join My Newsletter & Get Updates!

Get notified whenever a new technical guide, server infrastructure breakdown, or personal reflection goes live, plus a curated weekly digest.