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.

This feature is provided on top of the cache analysis feature of CloudDBA.

Usage notes

  • This feature is unavailable for ApsaraDB for Redis Community Edition instances that run Redis 7.0 and ApsaraDB for Redis Enhanced Edition (Tair) DRAM-based instances that are compatible with Redis 6.0.
  • If the instance type of an instance has been changed, backup files that are generated before the change cannot be analyzed.
  • The Offline Key Analysis feature is supported only for Redis data structures and the following in-house data structures of Tair: TairString, TairHash, TairGIS, TairBloom, TairDoc, TairCpc, and TairZset.


  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 that you want to manage resides. Then, find the instance and click its 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.
  4. In the dialog box that appears, specify the node and analysis method.
    Specify the node and analysis method
    NodeThe ID of the node for which you want to perform offline key analysis.
    Note You can select the entire instance or a specific node for analysis.
    Analysis MethodThe backup file that is used for analysis.
    • Use Recent Backup File: analyzes the most recent backup file.
    • Select a historical backup file: analyzes a historical backup file.
    • Create New Backup for Analysis: creates a backup file and analyzes the file. This allows you to analyze the current state of the instance.
    Note If you analyze an existing backup file, make sure that the point in time when the backup file is generated meets your requirements.
  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.
    • Basic information: displays basic information of an instance such as the basic instance attributes and the cache analysis method. Basic information
    • Related node: displays the memory usage and key statistics on each node of the instance. Result 1
      Note The Related node section is displayed on the Details page only if the instance is a cluster or read/write splitting instance and the entire instance is selected for the preceding Node parameter.
    • 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 the ranking of large keys. Analysis details


  • Q: What do I do if I use a Resource Access Management (RAM) user and do not have the required permissions to analyze offline keys?

    A: Grant the required permissions to the RAM user and try again. For more information, see Grant RAM users permissions to call API operations to analyze full keys offline.

  • Q: Some offline key analysis tasks take a longer time period than other tasks. Why?

    A: As asynchronous tasks, offline key analysis tasks have their time consumption associated with the total number of ongoing tasks in CloudDBA. If a larger than expected number of tasks are waiting, offline key analysis tasks also need to wait.

  • Q: What do I do if a "decode rdbfile error: rdb: unknown object type 116 for key" error occurs?

    A: The backup file cannot be analyzed because the file contains non-standard Bloom filters. Check whether the file contains non-standard Bloom filters.

  • Q: What do I do if a "decode rdbfile error: rdb: invalid file format" error occurs?

    A: The backup file that is selected for analysis is invalid. Check whether the instance has a configuration change after the file is generated.

  • Q: What do I do if a "decode rdbfile error: rdb: unknown module type" error occurs?

    A: The backup file cannot be analyzed because the file contains incompatible data structures of Tair. Check whether the file contains incompatible data structures.

Related API operations

CreateCacheAnalysisJobCreates a cache analysis task.
DescribeCacheAnalysisJobQueries the details of a cache analysis task.
DescribeCacheAnalysisJobsQueries the cache analysis tasks.