The most common parameter for controlling minor compactions is minor_freeze_times, which controls the number of minor compactions that triggers a major compaction. If this parameter is set to 0, minor compactions are disabled. Each time the MemTable memory usage of the tenant reaches the specified threshold, a major compaction is directly performed without performing minor compactions. You can configure the parameters based on the specific business needs.
| Parameter | Description | Default value | Value range |
|---|---|---|---|
| minor_compact_trigger | The number of SSTables to trigger a minor compaction. | 2 | [0, 16] |
| minor_freeze_times | The number of minor compactions to trigger a major compaction. | 0 | [0, 65535] |
| minor_merge_concurrency | The concurrency or number of concurrent threads for a minor compaction. The value 0 indicates only one thread. | 0 | [0,64] |
| minor_deferred_gc_time | The period of time for which SSTable collection is deferred after a minor compaction. | 0s | [0s, 24h] |
| minor_warm_up_duration_time | The warm-up time after a minor compaction. | 30s | [0s, 60m] |
| freeze_trigger_percentage | The threshold of memory used by the memstore of the tenant in percentage for triggering a minor freeze. | 70 | [1, 99] |
| memstore_limit_percentage | The percentage of the memory occupied by the memstore of the tenant to the total memory of the tenant. | 50 | [1, 99] |
Note
The minor_freeze_times parameter increases along with the number of minor compactions triggered because the MemTable memory usage reaches the specified threshold. Manually executed minor compactions are not counted. minor_freeze_times does not increase no matter how many minor compactions are manually executed. For example, assume that minor_freeze_times is 3. After ALTER SYSTEM MINOR FREEZE is executed three times, a major compaction is not triggered when the MemTable memory usage reaches the specified threshold, because the manually executed minor compactions are not counted.
OCP V2.4.x and later versions provide the Threshold Number of SSTables to Trigger Minor Freeze, Minor Freezes to Trigger Major Freeze, Threads for Minor Freeze, and Memory Usage for Triggering Minor Freeze parameters. For details, see Modify major compaction settings in the OCP User Guide of the corresponding version.