The following table describes the parameters related to major compaction.
| Parameter | Description | Default value | Value range |
|---|---|---|---|
| major_freeze_duty_time | The scheduled time for daily major compactions. | 02:00 | [00:00,24:00] |
| major_compact_trigger | Equivalent to minor_freeze_times. |
5 | [0,65535] |
| merge_stat_sampling_ratio | The statistics sampling rate in a major compaction. Statistics collection is disabled when it is set to 0. |
100 | [0,100] |
| merge_thread_count | The number of threads for major compactions. | 0 | [0, 256] |
| enable_merge_by_turn | Specifies whether to enable rotating major compaction. | false | * true: enabled * false: disabled |
| zone_merge_order | The compaction sequence of zones during a rotating major compaction. | Null | Null |
| zone_merge_concurrency | The number of zones compacted in a concurrent major compaction. | 0 | [0,+∞] |
| default_progressive_merge_num | The default compaction mode specified during table creation. | 0 | [0, +∞) Where: * 0: indicates that 100 progressive compactions will be performed. * 1: indicates that a full compaction will be forcibly executed without executing a progressive compaction. * > 1: indicates that the specified number of progressive compactions will be executed when a Schema change occurs. |
| enable_manual_merge | Specifies whether to enable manual compaction. Note If enable_manual_merge is set to true, you need to manually compact the zones in the cluster one by one. |
false | * true: enabled * false: disabled |
| max_kept_major_version_number | The maximum number of major compaction versions retained. | 2 | [1, 16] |
| zone_merge_timeout | The timeout duration for a major compaction of a zone. | 3h | [1s, +∞) |
| merger_check_interval | The interval for checking the major compaction progress of each zone. | 10m | [10s, 60m] |
| merger_completion_percentage | The percentage of zones or data for which the major compaction has completed. | 100 | [5, 100] |
| enable_global_freeze_trigger | Specifies whether to enable automatic triggering of global freeze. If this feature is enabled, a global freeze and major compaction are triggered when the memory occupied by data exceeds the value of freeze_trigger_percentage. |
false | * true: enabled * false: disabled |
Starting from OCP V2.4.x, OCP provides the Rotating Major Freeze switch, and supports the configuration of the following parameters: Daily Major Freeze Time, Worker Threads for Major Freeze, Major Freeze Timeout Period, and Maximum Zones Concurrently Involved in Rotating Major Freeze. For more information, see the Compaction management chapter in the OCP User Guide of the corresponding version.