InnoDB Buffer Pool, Page Management, Change Buffer, and Log Buffer Overview
This article explains InnoDB's in‑memory structures, detailing the Buffer Pool architecture, page classifications and their management via free, flush, and LRU lists, the role and workflow of the Change Buffer, and the purpose and configuration of the Log Buffer.
InnoDB's internal architecture is divided into memory structures and disk structures. The memory side includes the Buffer Pool, Change Buffer, Log Buffer, and Adaptive Hash Index.
Buffer Pool caches table and index data to reduce disk I/O. It consists of data pages (Page) and control blocks that describe each page. The default size is 128 MiB, with pages of 16 KiB and control blocks occupying about 5 % of each page.
Pages are classified as Free , Clean , or Dirty . InnoDB manages these pages using three linked lists:
Free list : holds control blocks of unused pages.
Flush list : stores dirty pages that need to be written back to disk, ordered by modification time.
LRU list : a Least‑Recently‑Used list that moves accessed pages to the head and evicts pages from the tail.
The standard LRU list can suffer from cache pollution during full‑table scans, so InnoDB also provides an improved LRU that splits the list into new and old sections, inserting newly read pages at a midpoint and promoting frequently accessed pages toward the head.
Change Buffer is a write‑buffer for secondary (non‑unique) index updates. Instead of loading the index page into the Buffer Pool for each modification, InnoDB records the change in the Change Buffer and applies it later during a merge operation, which can be triggered by page access, a background thread, or shutdown. The Change Buffer occupies about 25 % of the Buffer Pool by default (configurable up to 50 %).
Log Buffer holds redo/undo log records before they are flushed to the on‑disk log file. Its size can be increased with innodb_log_buffer_size to reduce flush frequency. The flushing behavior is controlled by innodb_flush_log_at_trx_commit (values 0, 1, or 2).
Finally, the Adaptive Hash Index provides a hash‑based shortcut for frequently accessed pages in the Buffer Pool, further improving query performance.
Overall, this article covers the key components of InnoDB's memory architecture and how they interact to optimize I/O and maintain data consistency.
政采云技术
ZCY Technology Team (Zero), based in Hangzhou, is a growth-oriented team passionate about technology and craftsmanship. With around 500 members, we are building comprehensive engineering, project management, and talent development systems. We are committed to innovation and creating a cloud service ecosystem for government and enterprise procurement. We look forward to your joining us.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.