Databases 23 min read

InnoDB Physical File Structure and Management Overview

This article provides a comprehensive technical overview of InnoDB's physical file architecture, detailing how fixed‑size blocks, page types, extents, file‑list structures, segment creation, page allocation, recycling mechanisms, index page composition, and both traditional and transparent compression methods work together to manage MySQL storage efficiently.

Qunar Tech Salon
Qunar Tech Salon
Qunar Tech Salon
InnoDB Physical File Structure and Management Overview

InnoDB stores data in fixed‑size blocks organized as B‑tree structures, with different page types managing logs, system tablespace, undo, temporary and user tablespaces.

Physical files are divided into pages (default 16 KB) grouped into extents; the size of extents varies with page size, and each tablespace contains management pages such as the file‑list (FLST), FSP_HDR, IBUF bitmap, and INODE pages.

The file‑list uses FLST_BASE_NODE and FLST_NODE structures to maintain chains of free, full and fragmented extents.

FSP_HDR pages initialize tablespace headers and track up to 256 extents, while XDES pages describe each extent’s state.

IBUF bitmap pages record change‑buffer information for each page, and INODE pages store segment descriptors for B‑tree leaf and non‑leaf segments.

Segment creation and page allocation follow a multi‑step process involving functions such as fsp_reserve_free_extents , fseg_create_general , fseg_alloc_free_page_low , and fsp_try_extend_data_file , preferring to fill fragment arrays before allocating whole extents.

Page recycling reclaims free pages or whole extents using functions like btr_page_free , fseg_free_page and fsp_free_extent , and also handles segment release after index or table drops.

Index pages (type FIL_PAGE_INDEX ) consist of a page header, index header, segment info, system records, user records, free space, page directory and trailer; they store B‑tree nodes for clustered and secondary indexes.

InnoDB supports two compression methods: Transparent Page Compression (using punch‑hole holes) and the traditional compression, both introducing a FIL_PAGE_COMPRESSED page type.

InnoDBMySQLFile SystemB-TreeDatabase Storagepage management
Qunar Tech Salon
Written by

Qunar Tech Salon

Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.

0 followers
Reader feedback

How this landed with the community

login 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.