Updated on 2024-03-04 GMT+08:00

Viewing Redis Slow Queries

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 maximum allowed number of slow queries that can be logged. The default value is 128. That is, if the number of slow queries exceeds 128, the earliest record will be deleted to make room for new ones.

For details about the configuration parameters, see Modifying Configuration Parameters of an Instance.

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.

Viewing Slow Queries on the Console

  1. Log in to the DCS console.
  2. Click in the upper left corner of the management console and select the region where your instance is located.
  3. In the navigation pane, choose Cache Manager.
  4. Click the name of a DCS instance.
  5. Choose Analysis and Diagnosis > Slow Queries.
  6. Select a start date and an end date to view slow queries within the specified period.

    • For details about the commands, visit the Redis official website.
    • Currently, you can view slow queries in the last seven days.
    • The real client IP address is displayed in the Client IP Address column of the slow query list of an instance with client IP pass-through enabled.
    Figure 1 Slow queries of an instance