Viewing Slow Queries of a DCS Redis Instance
Redis logs queries that exceed a specified execution time. You can view the slow logs on the DCS console to identify performance issues.
For details about the commands, visit the Redis official website.
Configure slow queries with the following parameters:
- slowlog-log-slower-than: The maximum time allowed, in microseconds, for command execution. If this threshold is exceeded, Redis will log the command. The default value is 10,000. That is, if command execution exceeds 10 ms, the command will be logged.
- slowlog-max-len: The number of slow queries in a record. The default value is 128, which means a maximum of 128 latest slow queries can be displayed.
The following parameters are available only in the CN East-Shanghai2 and CN South-Guangzhou regions.
- proxy-slowlog-log-slower-than: The maximum time allowed, in microseconds, for command execution. If this threshold is exceeded, Redis will log the command. The default value is 256,000. That is, if command execution exceeds 256 ms, the command will be logged.
- proxy-slowlog-max-len: The number of slow queries in a record. The default value is 128, which means a maximum of 128 latest slow queries can be displayed.
For details about the configuration parameters, see Modifying Configuration Parameters of a DCS Instance.
Notes and Constraints
- You can view the slow queries of a Proxy Cluster DCS Redis 3.0 instance only if the instance is created after October 14, 2019.
- Currently, you can view slow queries in the last seven days.
- After restarting an instance, slow queries before the restart cannot be viewed.
Procedure
- Log in to the DCS console.
- Click in the upper left corner of the management console and select the region where your instance is located.
- In the navigation pane, choose Cache Manager.
- Click the name of a DCS instance.
- Choose Analysis and Diagnosis > Slow Queries.
- Select a start date and an end date and click the refresh icon to view slow queries within the specified period. For details about the commands, visit the Redis official website.
To filter slow queries, click the filtering bar, select a property or enter a keyword.
Currently, slow queries of only Proxy Cluster and read/write splitting instances in the CN East-Shanghai1, CN East-Shanghai2, and CN South-Guangzhou regions contain Proxy and Redis Server categories for proxy and Redis instance node records.
- For Proxy Cluster and read/write splitting instances created before August 2024, and the proxies are not upgraded, contact technical support to upgrade proxies. Otherwise, the slow queries under Proxy is always blank.
- The real client IP address is in the Client IP Address column of the slow query list of an instance with client IP pass-through enabled. For Proxy Cluster and read/write splitting instances, the real client IP address is in the Proxy column.
Figure 1 Slow queries of an instance
- To download slow queries, choose Export > Export all data to an XLSX file or Export selected data to an XLSX file.
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