All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Suggestions for handling common Latency events

Last Updated:Mar 28, 2026

Use this reference to identify the root cause of a Redis latency event and apply the appropriate fix.

Before you start

Check these common causes before diving into specific events:

  1. Slow commands. Commands that scan all keys (for example, KEYS) block the main thread. Review slow query logs to find them. See Query slow query logs.

  2. Large keys. Large keys slow down eviction and expiration. Use offline key analysis to identify them. See Use the offline key analysis feature.

  3. High memory usage. When occupied memory exceeds the maxmemory limit, eviction cycles run frequently. See Change the configurations of an instance.

Background

Redis 2.8.13 introduced latency monitoring, which collects data from the last 160 seconds and records only the highest-latency event per second.

Tair (Redis OSS-compatible) provides latency insights, an advanced alternative that records up to 27 events with the execution durations of all commands, and retains latency statistics for the last three days. For event names and their latency thresholds, see Common special events.

Common latency events

Some events have a parent-child relationship:

  • AofWrite is the parent event. Each time data is written to an append-only file (AOF), Redis records AofWrite along with exactly one of three child events: AofWriteAlone, AofWriteActiveChild, or AofWritePendingFsync. To find the specific cause, analyze the child event.

  • EvictionCycle is the parent event for eviction. Analyze EvictionDel and EvictionLazyFree together to determine what is driving the eviction latency.

EventWhat it measuresCommon causeWhat to do
EvictionCycleTime for a full eviction cycle, including key selection, deletion, and background thread waitMultiple factors — analyze EvictionDel and EvictionLazyFree to pinpoint the causeReview key usage and optimize business data. If evictions occur frequently, scale up the instance to keep memory usage below maxmemory.
EvictionDelTime to delete keys during an eviction cycleLarge keys being evictedAvoid large keys. Enable asynchronous eviction by setting lazyfree-lazy-eviction to yes. If evictions occur frequently, scale up the instance.
EvictionLazyFreeTime waiting for background threads to release memoryNo evictable keys are available while background threads are freeing memory (for example, by deleting large keys)Adjust the memory eviction policy using the maxmemory-policy parameter. If evictions occur frequently, scale up the instance.
ExpireCycleTime for a key expiration cycleLarge keys being deletedAvoid large keys. Enable asynchronous expiration by setting lazyfree-lazy-expire to yes. Clear expired data regularly in the console.
ExpireDelTime to delete keys during a key expiration cycleLarge keys being deletedAvoid large keys.
AofWriteTotal time to write data to AOFsMultiple factors — analyze AofWriteAlone, AofWriteActiveChild, and AofWritePendingFsync to pinpoint the causeIf data persistence is not required, disable AOF by setting appendonly to no.
AofWriteAloneTime for an AOF write with no concurrent child processes or pending fsyncLarge write volume or disk performance bottlenecksIf AOF is not required, set appendonly to no.
AofWriteActiveChildTime for an AOF write while child processes are also writing to diskChild process disk I/O competing with AOF writesIf AOF is not required, set appendonly to no.
AofWritePendingFsyncTime for an AOF write while a background fsync is in progressBackground fsync competing with AOF writesIf AOF is not required, set appendonly to no.
CommandsTime for regular commands (not labeled as fast)Commands that traverse all data, such as KEYSReview slow query logs to find long-running commands. Use offline key analysis to check for large keys.
FastCommandTime for fast commands with O(1) or O(log N) complexityFast commands copying large amounts of data (for example, GET on a large key)Identify and split large keys. See Identify and handle large keys and hotkeys.
ForkTime to call fork()AOF rewritesIf data persistence is not required, disable AOF by setting appendonly to no.

What's next