WL#14521: InnoDB: Introduce dynamic system variable to configure file segment fill factor
Affects: Server-8.0
—
Status: Complete
The amount of empty pages in an ibd file is currently controlled by a compile time
constact FSEG_FILLFACTOR, which is defined as 1/8. This means that 1/8th (12.5%)
of the ibd file is kept as empty pages. Facebook reported that this value is too
high and they have contributed a patch to make this a user configurable dynamic
system variable. See BUG#102044 (facebook contribution).
This worklog introduces new configuration variable innodb_segment_reserve_factor
which is applicable to all tables and tablespaces. This variable defines the
percentage of free pages in a file segment. This means that the percentage of
free pages in a file segment of InnoDB will always be kept greater than or equal
to the requested innodb_segment_reserve_factor value.
The default value for this variable is 12.5%, which is the current hard-coded
compile time constant (FSEG_FILLFACTOR). The newly introduced variable
innodb_segment_reserve_factor can be dynamically configured by the user.
FR-1: The user must be able to dynamically modify the variable innodb_segment_reserve_factor.
FR-2: While populating data into the table, the segments must respect the value of innodb_segment_reserve_factor.
Details about the new configuration variable:
The new configuration variable innodb_segment_reserve_factor is used to specify the percentage of free pages in a file segment of innodb.
Command-Line Format --innodb-segment-reserve-factor=#
System Variable innodb_segment_reserve_factor
Scope Global
Dynamic Yes
Type Double
Default Value 12.5
Minimum Value 0.03
Maximum Value 40
Copyright (c) 2000, 2025, Oracle Corporation and/or its affiliates. All rights reserved.