Configuring Auto Throttling
Auto throttling helps ensure availability of your workloads. It restricts the execution of SQL statements during peak hours or when there are read/write exceptions by limiting how many SQL statements can be executed at the same time.
After it is enabled, the system performs flow control on sessions when the criteria you specify for your instance are met (for example, the number of active connections to your instance exceeds the Max. Active Connections parameter value).
To use this function, subscribe to Intelligent O&M first.
Constraints
To use this function, submit a service ticket to request permissions.
Procedure
- Log in to the management console.
- Click
in the upper left corner and select a region and a project.
- Click
in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, click the instance name to go to the Overview page.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Choose SQL Explorer > Auto Throttling.
- Click Auto Throttling.
- Toggle on
and configure required parameters. For details about the parameters, see Table 1.
Example for setting auto throttling parameters
Set Time Window to 15:00-18:00, Max. Duration to Last 5 minutes, vCPU usage ≥ to 90%, Active sessions ≥ to 20, and and Duration (min) to 5. When all the criteria are met, auto throttling is triggered. If your vCPU usage or number of active sessions falls below the threshold during the time window, auto throttling ends.
Figure 1 ExampleTable 1 Parameter description Parameter
Description
Database
The name of the database for which auto throttling needs to be enabled. Ensure that the database you select is consistent with the one specified in the use <database> statement, or auto throttling will fail.
Username
The name of the user that auto throttling is applied.
If no username is specified, auto throttling will be applied to user root.
Time Window
The time when auto throttling is applied. Auto throttling can be triggered only once within the time window.
Max. Duration
Maximum length of time that SQL statements matching the auto throttling policy can be throttled within the time window.
vCPU usage
vCPU usage threshold for the instance. You also need to specify the relationship between the vCPU usage and active sessions. Their relationship can be and or or.
Active sessions
Threshold for active sessions. Value range: 1 to 5000
Duration (min)
How long the vCPU usage and active sessions exceed the specified values.
For example, if you set vCPU usage ≥ to 90%, Active sessions ≥ to 1000, and Duration (min) to 30, auto throttling will be triggered only when the vCPU usage and active sessions exceed 90% and 1,000 for 30 minutes.
Max. Active Connections
Maximum number of active connections allowed. Value range: 1 to 5000
For example, if you set Max. Active Connections to 500, the system will automatically end some active connections when necessary to keep the number of active sessions within 500.
- Click OK. You will see a record generated on the page every time auto throttling is triggered. You can see historical details, too.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot