Note
This parameter is available starting with V2.2.30.
Description
writing_throttling_trigger_percentage specifies the threshold for write speed.
Privilege requirements
Query the parameter
The
systenant and all user tenants can query this parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and user tenants can modify this parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | Int |
| Default value | 60
NoteStarting from V4.0.0, the default value is changed 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 MemStore. To avoid memory overflow, the system provides two important protection mechanisms:
The freezing mechanism: persist data in memory to disk to release memory space.
The throttling mechanism: reduce write speed when memory pressure is high to gain time for memory release.
The triggering of these two mechanisms is controlled by two tenant-level parameters: freeze_trigger_percentage (freezing threshold) and
writing_throttling_trigger_percentage(throttling threshold).To avoid performance degradation caused by early throttling, the value of
writing_throttling_trigger_percentagemust be greater than that of freeze_trigger_percentage.Starting from V4.0.0, the default value of this parameter is changed to 60. This is because the throttling feature is very stable and rarely triggers in most business scenarios except for sudden import traffic. In import scenarios, throttling is better than stopping writes. To achieve smooth throttling, the trigger point is set to 60 instead of 80. If the trigger point is set to 80, the system would need to consume the remaining 20% buffer to handle the accumulated 80% MEMStore memory usage, which would result in a very abrupt throttling effect and a significant increase in response time on the business side.
When the memory used by MemStore reaches the threshold, write throttling is triggered. If the value of this parameter is 100, write throttling is disabled.
Examples
Set the threshold for write speed to 60.
obclient> ALTER SYSTEM SET writing_throttling_trigger_percentage = 60;
