The offline key analysis feature can analyze backup files of ApsaraDB for Redis and identify large keys in your instances. This feature allows you to view key statistics including the memory usage, distribution, and expiration time of keys. You can optimize your instances based on the analytic results. This feature helps you resolve issues such as insufficient memory and performance degradation that are caused by the skewed distribution of keys.


A performance-enhanced, persistent-memory optimized, or storage-optimized instance of the ApsaraDB for Redis Community Edition or Enhanced Edition (Tair) is created. For more information, see Performance-enhanced instances, Persistent memory-optimized instances, and Storage-optimized instances.


  1. Log on to the ApsaraDB for Redis console and go to the Instances page. In the top navigation bar, select the region in which the instance is deployed. Then, find the instance and click the instance ID.
  2. In the left-side navigation pane, choose CloudDBA > Offline Key Analysis.
    By default, the analytic results of the last day are displayed on the Offline Key Analysis tab. You can specify another time range based on your requirements.
  3. On the Offline Key Analysis page, click Analyze.
    Cache analysis
  4. In the dialog box that appears, specify the node and analysis method.
    Specify the node and analysis method
    Parameter Description
    Select a node for analysis The ID of the node on which you want to perform cache analysis.
    Note You can select an instance or a node for analysis. If you select an instance that contains more than eight nodes, the system analyzes only the top eight nodes that have the highest memory usage.
    Analysis Method The method that you want to use to analyze the cache. Valid values: Use Previous Backup File and Create a new backup and use the latest backup for analysis.
  5. Click OK.
    The system performs cache analysis and displays the analysis state. You can click Refresh to update the analysis state.
  6. Find the completed analysis task and click Details in the Actions column to view the detailed results.
    Note If you select a cluster instance or a read/write splitting instance from the Select a node for analysis drop-down list, you can view node information in the Relevant Nodes section and select a node in the Details section of the Details page.
    • Basic information: displays basic information of an instance such as the instance basic attributes and the cache analysis method. Basic information
    • Relevant Nodes: displays the memory usage and key statistics on each node of the instance. Result 1
    • Details: displays the details about an instance or a node, such as the memory usage and distribution of keys, memory usage and distribution of elements in keys, distribution of key expiration time, and ranking of large keys. Cache analysis details


Q: Why am I unable to perform an analysis task?
Figure 1. Failed analysis task
Failed cache analysis

A: Because you use a new ApsaraDB for Redis 4.0 or later instance. Bloom filter-related API operations, such as BF.ADD, are only for internal use on existing ApsaraDB for Redis 4.0 instances. These API operations are no longer supported by new ApsaraDB for Redis 4.0 and later instances. Therefore, if you call Bloom filter-related API operations on these instances, offline key analysis fails and unknown errors may occur. We recommend that you change the instance into a performance-enhanced instance of the ApsaraDB for Redis Enhanced Edition (Tair) that supports the optimized Bloom filter. For more information about performance-enhanced instances, see Performance-enhanced instances.