This topic describes how to modify major compaction parameters.
Major compaction parameters
| Parameter | Description | Default value | Value range |
|---|---|---|---|
| minor_compact_trigger | The threshold of the number of SSTables at the tenant level. A major compaction is triggered when the threshold is reached. | 2 | [0, 16] |
| freeze_trigger_percentage | The threshold of the percentage of memory occupied by tenant MemStores. A freeze is triggered when the threshold is reached. | 20 | (0, 100) |
| memstore_limit_percentage | The threshold of the percentage of total memory occupied by tenant MemStores.
NoteIn V4.3.x, the
|
0 | [0, 100) |
Modify major compaction parameters using an SQL statement
Log in to the database as the tenant administrator.
Execute the following statements to modify the major compaction parameters.
Here is an example:
obclient> ALTER SYSTEM SET minor_compact_trigger=2; obclient> ALTER SYSTEM SET freeze_trigger_percentage=20; obclient> ALTER SYSTEM SET memstore_limit_percentage=50;After the parameters are modified, you can execute the
SHOW PARAMETERSstatement to verify whether the modifications are successful.Here is an example:
obclient> SHOW PARAMETERS LIKE 'minor_compact_trigger'; obclient> SHOW PARAMETERS LIKE 'freeze_trigger_percentage'; obclient> SHOW PARAMETERS LIKE 'memstore_limit_percentage';