In the ApsaraDB for Redis console, you can view slow logs in a specified period to find clues to resolve performance issues and optimize requests.
ApsaraDB for Redis uses slow logs to record requests that are run for a long time. If a command is run for a longer time than the threshold specified by the slowlog-log-slower-than parameter (in microseconds), the command is recorded in a slow log. In ApsaraDB for Redis, the default value of the slowlog-log-slower-than parameter is 10,000 μs, that is, 10 ms.
The slowlog-max-len parameter specifies the maximum number of slow logs stored by an ApsaraDB for Redis instance. By default, an ApsaraDB for Redis instance stores 128 slow logs.
To view slow logs of an instance, you can log on to the ApsaraDB for Redis console and choose Logs > Slow Logs from the left-side navigation pane.
View slow logs on the console
- The engine version of the ApsaraDB for Redis instance is Redis 4.0 or later.
- The minor version of the ApsaraDB for Redis instance is the latest.
- Log on to the ApsaraDB for Redis console.
- In the upper-left corner of the top navigation bar, select the region where the target instance is located.
- On the Instance List page, click the target instance ID or Manage in the Action column for the target instance.
- On the Instance Information page, choose from the left-side navigation pane.
- On the Slow Logs page, click the calendar icon next to Query Time, select a time option or set Start Time and End Time, and then click OK.
Note If you use an ApsaraDB for Redis instance of the cluster edition, you can click Data nodes next to Query Time and select the target node.