This topic describes how to view slow logs collected during a specified period of time in the ApsaraDB for Redis console. You can view slow logs to resolve performance issues and optimize requests.
Prerequisites
- ApsaraDB for Redis Enhanced Edition (Tair)Performance-enhanced instances
- ApsaraDB for Redis Community Edition: 4.0, 5.0, or 6.0
Background information
Slow log type | Description | Parameter |
---|---|---|
Slow logs from data nodes |
|
For more information, see Modify parameters of an instance. |
Slow logs from proxy nodes |
|
rt_threshold_ms: specifies the threshold of command execution time for slow logs from proxy nodes.
Default value: 500. Unit: ms. We recommend that you set the threshold to a value close
to the client timeout value, which is from 200 ms to 500 ms.
For more information, see Modify parameters of an instance. |
Procedure
Execution durations of special slow SQL statements
- latency:eventloop
ApsaraDB for Redis uses the event-driven mode during runtime. An event loop includes reading command, parsing, and running command, and returning results. The execution duration of a
latency:eventloop
statement indicates the overall amount of time taken for an event loop. - latency:pipeline
ApsaraDB for Redis allows the client to work in pipeline mode. In this mode, the client sends commands in batches and returns results in batches after all commands are run. The execution duration of a
latency:pipeline
statement indicates the overall amount of time taken to handle all requests from the client in pipeline mode.Note By default, proxy servers of ApsaraDB for Redis cluster instances send requests to the backend Redis server in pipeline mode.
Related API operations
API | Description |
---|---|
DescribeSlowLogRecords | Queries slow logs of an ApsaraDB for Redis instance in a specified time period. |