Configuring Auto Throttling
Scenarios
Auto throttling allows you to set criteria, such as the vCPU threshold and maximum number of active connections. When the criteria are met, the system automatically performs flow control on sessions to ensure the availability of core services in scenarios such as high burst traffic and abnormal reads/writes.
Prerequisites
If you use auto throttling for the first time, subscribe to Intelligent O&M first.
- In the Auto Throttling area, click Subscribe. In the displayed dialog box, you can learn about the value-added functions and billing rules.
- (Optional) If you enable Collect Slow Query Logs and Collect All SQL Statements, slow query logs and all SQL statements are collected and analyzed from multiple angles. For details, see Viewing Slow Query Logs of a DB Instance and Viewing Top SQL Statements of a DB Instance.

Procedure
- Click
in the upper left corner and select a region.
- Click
in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, click the DB instance name.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click SQL Explorer and then Auto Throttling.
- Click Auto Throttling.
- Toggle on
and configure required parameters. For details about the parameters, see Table 1.
Figure 2 ExampleExample 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.
Table 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 your SQL statements, or the auto throttling policy will fail.
If the database name is not specified, auto throttling is applied to all databases by default.
Username
The name of the user that auto throttling is applied.
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 (≥ 70%). 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 vCPU usage and active sessions exceed the specified values. The duration can range from 2 minutes to 60 minutes.
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. The value can range from 1 to 5,000. Auto throttling stops when the number of active connections drops to this limit.
- Click OK.
- You will see a record generated on the page every time auto throttling is triggered. You can see historical details, too.
Follow-up Operations
After auto throttling is enabled, you can determine whether to kill sessions based on service requirements. To learn how to kill sessions, see Managing Real-Time Sessions.
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