All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Query slow query logs

Last Updated:Mar 28, 2026

When your Tair (Redis OSS-compatible) instance experiences high latency or timeouts, slow query logs help you identify which commands exceeded an execution time threshold and locate the root cause. Logs are generated at two levels—data nodes and proxy nodes—each measuring different parts of the request lifecycle.

Slow query logs are not supported for Redis Open-Source Edition 2.8 instances. To view slow logs for a 2.8 instance, go to CloudDBA > Slow Queries in the console. Slow logs for 2.8 instances do not include client IP addresses.

How slow query logs work

Tair generates slow query logs from two sources. Each source measures execution time differently and serves a different diagnostic purpose.

Log sourceWhat the duration measuresRetentionRecommended for
Data nodeTime to run the command on the data node only. Excludes network transmission and queuing latency. In most cases, few slow query logs are generated on data nodes due to high instance performance.72 hoursIdentifying slow commands at the engine level
Proxy nodeTime from when the proxy sends the request to a data node until it receives the response. Includes command execution, network transmission, and queuing latency.72 hoursTroubleshooting timeout issues (closer to actual application latency)

Storage is unlimited for both log sources.

Proxy node slow logs are not available for Standard instances.

Parameters

Data node parameters

ParameterDefaultUnitDescription
slowlog-log-slower-than20000MicrosecondsCommands that run longer than this value are logged. 20000 microseconds equals 20 milliseconds. Because this value excludes network and queuing latency, actual end-to-end latency is typically higher.
slowlog-max-len1024Maximum number of slow query log entries stored.

Proxy node parameters

ParameterDefaultUnitDescription
rt_threshold_ms500MillisecondsCommands that take longer than this value are logged. Set this close to your client timeout period, typically between 200 and 500 milliseconds.

To modify these parameters, see Configure instance parameters.

View slow logs in the console

  1. Log on to the console and go to the Instances page. In the top navigation bar, select the region where your instance resides, then click the instance ID.

  2. In the left-side navigation pane, choose Logs > Slow Logs.

  3. On the Slow Logs page, filter logs by time range or keyword. For cluster and read/write splitting instances, you can also filter by node type and node ID.

    By default, the Host Address field shows proxy node IP addresses for cluster and read/write splitting instances. To display client IP addresses instead, set ptod_enabled to 1 in Parameter Settings. For details, see Configure instance parameters.

Irrelevant slow log entries

Some entries reflect internal engine behavior rather than actual command performance. You can ignore the following entries.

EntryDescription
latency:eventloopTair (Redis OSS-compatible) runs in event-driven mode. An event loop covers reading, parsing, running commands, and returning results. The duration of latency:eventloop reflects the total time for one event loop cycle.
latency:pipelineIn pipeline mode, the client sends commands and receives responses in batches. For cluster instances, proxy nodes use pipeline mode to send requests in batches to backend data nodes. The duration of latency:pipeline reflects the total time to process all requests in a pipeline batch.
latency:forkThe duration of latency:fork reflects the time to fork a child process. Larger datasets result in longer fork times.

API reference

OperationDescription
DescribeSlowLogRecordsRetrieves slow query logs for an instance within a specified time range.

Related topics

Use slow query logs to troubleshoot timeout issues