Note
For V2.2.30, this parameter is available starting with V2.2.30.
Description
writing_throttling_trigger_percentage specifies the threshold of 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
NoteFor V4.0.0, the default value of this parameter 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 the data written in the last period in MemStore. To prevent memory overflow, the system provides two important protection mechanisms:
Freezing mechanism: The data in memory is persisted to disk to release memory space.
Throttling mechanism: When the memory pressure is too high, the write speed is reduced to gain time for memory release.
These two mechanisms are 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.For V4.0.0, the default value of this parameter is changed to 60. This is because the throttling feature is very stable. In most business scenarios, the throttling feature is not triggered except for sudden data import. In data import scenarios, throttling is better than stopping writing. Therefore, the throttling feature is enabled by default. To achieve smooth throttling, the threshold is set to 60 instead of 80. If the threshold is set to 80, the remaining 20% buffer will be consumed to relieve the 80% memory usage of MemStore. This will result in a very abrupt throttling effect, which will cause a sharp increase in response time on the business side.
When the memory used by MemStore reaches this threshold, write throttling is triggered. When the value of this parameter is 100, the write throttling mechanism is disabled.
Examples
Set the threshold of write speed to 60.
obclient> ALTER SYSTEM SET writing_throttling_trigger_percentage = 60;