A major compaction can be automatically triggered.
Prerequisites
Before a major compaction is triggered, make sure that global major compaction is enabled. Global major compaction is controlled by the cluster-level parameter enable_major_freeze. The default value is True, which specifies to enable global major compaction.
If global major compaction is disabled for the current cluster, perform the following steps to enable this feature:
Log on to the
systenant of the cluster as therootuser.Verify that global major compaction is enabled.
obclient> SHOW PARAMETERS LIKE 'enable_major_freeze';If global major compaction is not enabled, execute the following statement to enable the feature:
obclient> ALTER SYSTEM SET enable_major_freeze='True';For more information about the
enable_major_freezeparameter, see enable_major_freeze.
Conditions for triggering an automatic major compaction
A major compaction is automatically triggered if the memory usage of the MemTable of a tenant reaches the value of the freeze_trigger_percentage parameter and the number of minor compactions reaches the value of the major_compact_trigger parameter.
For more information about the freeze_trigger_percentage and major_compact_trigger parameters, see Modify minor compaction settings.