Note
For V2.2.30, this parameter is available starting with V2.2.30.
Description
writing_throttling_trigger_percentage specifies the write speed threshold.
Privilege requirements
Query the parameter
You can use the
SHOW PARAMETERSstatement or theGV$OB_PARAMETERSview to query this parameter in thesystenant and all user tenants.Modify the parameter
You can modify this parameter in the
systenant and user tenants.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 60
NoteStarting from V4.0.0, the default value of this parameter has been adjusted from 100 to 60. |
| Value range | [1, 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 the MemStore. To prevent out-of-memory (OOM) errors, the system provides two key protection mechanisms:
- The freeze mechanism: This mechanism persists the data in memory to disk to free memory space.
- The write throttling mechanism: This mechanism slows down the write speed when memory pressure is high to free up memory.
These two mechanisms are controlled by two tenant-level parameters: freeze_trigger_percentage (freezing threshold) and
writing_throttling_trigger_percentage(write throttling threshold).To prevent performance degradation due to early throttling, ensure that the value of
writing_throttling_trigger_percentageis greater than that of freeze_trigger_percentage.Starting from V4.0.0, the default value of this parameter has been adjusted from 100 to 60. This is because the write throttling feature has become very stable, and in most business scenarios, the write throttling feature will not be triggered except for sudden import traffic. Additionally, write throttling can be better in import scenarios than completely stopping writes. Therefore, we enable the write throttling feature by default. To achieve a smoother throttling effect, we set the write throttling threshold to 60 instead of 80. If the threshold is set to 80, the system will need to consume the remaining 20% buffer to alleviate the 80% MEMStore memory usage, which will result in a more abrupt throttling effect and a sharp increase in response time on the business side.
When the memory usage in the MemStore reaches this threshold, the write throttling mechanism is triggered. If the value of this parameter is set to 100, the write throttling mechanism is disabled.
Examples
Set the write speed threshold to 60.
obclient> ALTER SYSTEM SET writing_throttling_trigger_percentage = 60;