Databases 4 min read

Analyzing Buffer Pool Instance Distribution for a Table in MySQL

This article explains why multiple InnoDB buffer pool instances are recommended, describes a simple experiment that shows how a table's data pages are distributed across two buffer pool instances in a 64‑page alternating pattern, and discusses the performance reasons behind this behavior.

Aikesheng Open Source Community
Aikesheng Open Source Community
Aikesheng Open Source Community
Analyzing Buffer Pool Instance Distribution for a Table in MySQL

As the memory usage of MySQL grows, it is advisable to enable multiple InnoDB buffer pool instances. The article investigates how many buffer pool instances a single table occupies and whether a table can reside in only one instance.

The experiment creates a test database, builds a populated table (referencing a previous experiment for the CREATE statement), repeatedly inserts rows to increase data volume, and then queries the buffer pool distribution. The query output (196 rows) is manually simplified for analysis.

Observations from the simplified results show a clear pattern:

The table’s data pages alternate between two buffer pool instances (POOL_ID 0 and 1).

Pages 3‑35 appear in POOL 1, while pages 36‑63 are empty.

Subsequently, every block of 64 pages switches to the other POOL, creating an alternating sequence.

The article explains why multiple buffer pools are needed: a single pool would cause heavy lock contention when accessing the buffer pool, whereas multiple pools distribute the lock load.

It also clarifies why pages are not assigned one‑by‑one to different pools: scanning contiguous pages is common, and assigning each page to a different pool would increase lock contention rather than alleviate it.

A practical tip is provided: querying information_schema.INNODB_BUFFER_PAGE can be expensive, so it should be avoided in production environments without proper testing.

Finally, the article shows how to estimate the amount of a specific table’s data residing in the buffer pool, noting that the number of rows does not map exactly to the number of pages because InnoDB pages contain more than just row data.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

InnoDBmysql
Aikesheng Open Source Community
Written by

Aikesheng Open Source Community

The Aikesheng Open Source Community provides stable, enterprise‑grade MySQL open‑source tools and services, releases a premium open‑source component each year (1024), and continuously operates and maintains them.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.