You can specify custom strategies for minor compactions and daily major compactions of a tenant as needed. A tenant-level strategy takes effect only on the current tenant. For more information about how to collectively modify the major compaction configurations of all tenants in a cluster, see Modify major compaction settings of a cluster.
Procedure
Log on to the OceanBase Cloud Platform (OCP) console.
In the left-side navigation pane, click Tenants. The Tenants page automatically appears.
In the Tenants list, find the target tenant and click its name.
In the left-side navigation pane of the page that appears, click Compaction Management.
Click the Configuration for Major Compaction tab.

Configure the major compaction strategy.
In the upper-right corner of the Major Compaction Strategy section, click Modify.
Hover the pointer over the
icon of a parameter and configure the major compaction strategy as prompted.- Daily Major Compaction Time: the point in time when the daily major compaction is performed. Valid values: 00:00 to 23:00.
- Merge task weight: the time slice weight of threads for the major compaction task. For example, if you set this parameter to 10 and the total weight of all running tasks is 100, the major compaction task consumes 10% of the CPU time.
After you configure the strategy, click Save.
Note
If the major compaction speed is slow, you can appropriately increase the value of Merge task weight. However, this operation reduces the weight of other running tasks in OceanBase Database, such as the backup and recovery task. Therefore, when multiple tasks are running in OceanBase Database at the same time, you need to determine whether to modify the weight of the major compaction task based on task priorities.
Configure the minor compaction strategy.
In the upper-right corner of the Minor Compaction Strategy section, click Modify.
Hover the pointer over the
icon of a parameter and configure the minor compaction strategy as prompted.After you configure the strategy, click Save.