Note
This parameter is available starting with V1.4.
Description
freeze_trigger_percentage specifies the percentage of the tenant's MemStore memory usage that triggers a freeze.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | Int |
| Default value | 20
NoteStarting from V4.0.0, the default value is 20. |
| Value range | (0, 100) |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
OceanBase Database stores recently written data in MemStore. To prevent memory overflow, the system provides two important protection mechanisms:
- The freeze mechanism: It persists data in memory to disk to release memory space.
- The throttling mechanism: It reduces the write speed when memory pressure is too high to create time for memory release.
The trigger times of these two mechanisms are controlled by two tenant-level parameters:
freeze_trigger_percentage(freeze threshold) and writing_throttling_trigger_percentage (throttling threshold).To avoid performance degradation caused by early throttling, the value of writing_throttling_trigger_percentage must be greater than the value of
freeze_trigger_percentage.You can adjust the ratio of MemStore memory in a tenant by using the following parameters:
When the active MemStore memory usage of a tenant reaches
freeze_trigger_percentage * memstore_limit(wherememstore_limit = tenant memory * memstore_limit_percentage), the system automatically triggers a freeze (the pre-action of a dump) and then schedules a dump. After the dump, the system releases the MemStore memory occupied.When memory is insufficient, you can increase the value of
memstore_limit_percentageand decrease the value offreeze_trigger_percentageto achieve temporary expansion and faster dumping. Thememstore_limit_percentageparameter specifies the ratio of tenant memory available for MemStore writes. The default value is 0, indicating that the system automatically adjusts the ratio.
Examples
Set the threshold percentage of MemStore memory usage for triggering a freeze to 20.
obclient> ALTER SYSTEM SET freeze_trigger_percentage=20;