Overview
freeze_trigger_percentage specifies the threshold percentage of memory used by a tenant's MemStore that triggers a freeze.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Int |
| Default Value | 20 |
| Value range | (0, 100) |
| Modifiable | Yes, you can use the following methods:ALTER SYSTEM SETStatement modification. |
| Whether to restart the OBServer node for the change to take effect | No, the setting takes effect immediately. |
Usage instructions
OceanBase AI Database uses the MemStore to store recently written data. To prevent memory overflow, the system provides two important protection mechanisms:
Freezing mechanism: Persist data in memory to disk to free up memory space.
Throttling mechanism: When memory pressure is high, the write speed is reduced to gain time for memory release.
These two mechanisms use two tenant-level parameters to control the trigger timing:
freeze_trigger_percentage(freezing threshold) and writing_throttling_trigger_percentage (throttling threshold).To avoid performance degradation caused by premature throttling, the value of writing_throttling_trigger_percentage must be greater than the value of
freeze_trigger_percentage.You can adjust the proportion of MemStore in tenant memory using the following parameter:
When the memory usage of a tenant's active MemStore reaches
freeze_trigger_percentage * memstore_limit(wherememstore_limit = tenant_memory * memstore_limit_percentage), the system automatically triggers the precursor action to minor compaction, and then schedules a minor compaction. After the minor compaction, the system releases the occupied MemStore memory.When memory is insufficient, you can increase the value of
memstore_limit_percentageand decrease the value offreeze_trigger_percentageto achieve temporary memory expansion and prompt minor compaction for memory release. The parametermemstore_limit_percentagespecifies the proportion of tenant memory available for MemStore writes. Its default value is 0, indicating that the system adaptively adjusts this proportion based on tenant memory availability.
Configuration example
Set the threshold percentage of MemStore memory used by a tenant that triggers a freeze to 20.
obclient> ALTER SYSTEM SET freeze_trigger_percentage=20;
References
- Minor compaction
- Automatically trigger a major compaction
- Tenant memory full