A minor compaction consists of two processes: a mini compaction and a major compaction.
Mini compaction
When the size of a MemTable exceeds the specified threshold, data in the MemTable is flushed to a SSTable file, called a mini SSTable, to release the memory space. This process is called a mini compaction.
The mini compaction is a process of data flushing and log compaction. A frozen MemTable in memory is flushed to the disk to become a mini SSTable, which is a checkpoint of data logs. After the mini compaction, the corresponding frozen MemTable and logs can be released.
Major compaction
As user data is written, the number of mini SSTables increases. This means more mini SSTables need to be accessed during queries, which compromises the query performance. The major compaction is initiated to merge multiple mini SSTables into one SSTable. This reduces the number of SSTables. If the number of mini SSTables exceeds the specified threshold, the system automatically initiates a major compaction in the background.
The major compaction can be further classified based on the SSTable layering strategy:
L0 -> L0
In a tiered compaction, the system merges several mini SSTables into one mini SSTable, which is placed in the L0 layer.

L0 -> L1
In a level compaction, the system merges several mini SSTables and minor SSTables into one minor SSTable, which is placed in the L1 layer.

Triggers
A minor compaction can be triggered automatically or manually.
When the memory usage of active MemStores of a tenant reaches freeze_trigger_percentage * memstore_limit (where memstore_limit = tenant memory * memstore_limit_percentage), the system automatically triggers a freeze (a pre-minor compaction action) and then schedules a minor compaction.
You can also manually trigger a minor compaction by using the following O&M command.
Note
The memstore_limit_percentage parameter specifies the percentage of memory available for MemStores out of the total available memory of a tenant. For more information, see memstore_limit_percentage.
Here are some examples:
Minor compaction at the cluster level
obclient> ALTER SYSTEM MINOR FREEZE TENANT = ALL;Minor compaction at the tenant level
obclient> ALTER SYSTEM MINOR FREEZE TENANT= prod_tenant;
References
For more information, see Minor compaction.