All Products
Search
Document Center

Tair (Redis® OSS-Compatible):Top key statistics

Last Updated:Aug 25, 2026

When memory or CPU usage increases in your Tair or Redis instance, you can use the Top Key Statistics feature to quickly identify large keys and hot keys. This feature displays real-time and historical data about these keys—such as keys with many elements, keys that use a large amount of memory, and frequently accessed hot keys—to help you resolve performance issues.

Identification and ranking mechanism

To avoid placing extra load on your database, this feature collects statistics only on keys accessed by client read or write operations. It retains and displays only a specified number of top keys for each type, rather than scanning all keys in the database in real time. Additionally, after an instance restarts or a high availability (HA) switchover occurs, the collected statistics are cleared, and the process begins again. As a result, keys that have not been accessed for a long time may not be included in the statistics. To analyze the memory usage and distribution of all keys in your database, use the Offline Key Analysis feature.

Key type

Applicable versions

Statistical mechanism

Description

Large key (by number of elements)

  • Redis Open-Source Edition 5.0 or later.

  • Tair (Enterprise Edition).

A key is considered a large key if its number of elements, such as fields in a Hash or members in a Set, reaches or exceeds a threshold (default: 2,000). You can customize this threshold by setting the bigkey-threshold parameter.

Note
  • Persistent memory instances do not support the bigkey-threshold parameter.

  • If this parameter is not displayed in the settings, upgrade the minor version of your instance and try again.

Displays up to the top three large keys for each data type. If multiple keys have the same number of elements, the one that was written first is prioritized.

Note
  • For Tair (Enterprise Edition) persistent memory instances, only the top three keys by element count across all key types are displayed.

  • For other instances, if only three large keys are displayed in total, upgrade the minor version and try again.

Large key (by memory usage)

Cloud-native memory-optimized instances of Tair (Enterprise Edition) with minor version 25.6.0.0 or later.

  • A key is considered a large key if its total memory usage exceeds a threshold (default: 500 MB). You can customize this threshold by setting the bigkey-mem-threshold parameter.

  • A key is also considered a large key if the average memory usage of its elements exceeds 1 MB. You can customize this threshold by setting the bigkey-field-mem-threshold parameter. For example, a String key is considered large if its value exceeds 1 MB. A Hash key with 100 key-value pairs is considered large if its total memory usage results in an average element size greater than 1 MB.

  • Effective May 26, 2026, the default value for bigkey-field-mem-threshold is changed from 50 MB to 1 MB.

Displays up to the top three large keys for each data type. If keys have the same memory usage, the one that was written first is prioritized.

Hot key (by QPS)

  • Redis Open-Source Edition 5.0 or later.

  • Tair (Enterprise Edition).

A key is considered a hot key if its queries per second (QPS) exceeds 5,000. You can customize this threshold by setting the hotkey-threshold parameter.

The system displays up to the top 50 hot keys and shows their precise real-time QPS.

Hot key statistics have limited support in earlier minor versions. We recommend that you upgrade to the latest minor version.

In versions earlier than Redis Open-Source Edition 7.0.18, 6.0.2.9, and 5.5.2.9, or memory-optimized Tair 5.0.50 and 25.2.0.0, the QPS threshold for hot keys was fixed at 3,000 and could not be adjusted. Only an approximate QPS range could be displayed, and Redis Open-Source Edition supported statistics for only 20 hot keys.

Hot key (by traffic)

Cloud-native memory-optimized instances of Tair (Enterprise Edition) with minor version 25.2.0.0 or later.

A key is considered a hot key if its access traffic exceeds 1 MB/s.

  • This feature is disabled by default. You can enable it by setting the #no_loose_high-cost-key-enabled parameter to yes.

  • You can adjust the traffic threshold in B/s by setting the #no_loose_high-cost-key-traffic-bytes-threshold parameter.

  • You can use the #no_loose_high-cost-key-parse-hashtag and #no_loose_high-cost-key-parse-prefix parameters to enable statistics for hashtags and prefixes. This allows the system to identify cases where individual keys have low traffic, but the aggregated traffic of keys with the same hashtag or prefix exceeds the threshold. This feature requires an upgrade to minor version 25.9.1.0 or later.

The system displays up to the top 50 hot keys and shows their precise inbound and outbound traffic, as well as access frequency.

Note

Statistics for non-existent keys are supported. If the data type is displayed as not-exist-key, it indicates that the key does not exist but is frequently accessed.

This feature supports the following data structures:

  • Native Redis data structures: String, List, Hash, Set, Zset, and Stream

  • Tair-developed data structures: TairString, TairHash, TairGIS, TairBloom, TairDoc, TairCpc, TairZset, TairRoaring, TairTS, and TairSearch

    Note

    Tair (Enterprise Edition) persistent memory instances support statistics for only TairHash and TairString.

Procedure

  1. Log on to the 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 the instance ID.

  2. In the left-side navigation pane, choose CloudDBA > Top Key Statistics.

  3. On this page, you can view real-time and historical data.

    The Top Key Statistics page contains four sections: Real-time Large Keys, Historical Large Keys, Real-time Hot Keys, and Historical Hot Keys. You can set the thresholds for identifying large and hot keys, click Refresh to manually fetch the latest data, or enable Auto-refresh to automatically update the results.

    Note
    • If your instance uses a cluster architecture or a read/write splitting architecture, you can also select a specific node from the Current Node drop-down list to view its data.

    • You can query historical data from the last four days. The maximum time range for a single query is three hours.

API reference

DAS API

Description

DescribeHotBigKeys

Gets real-time hot keys and large keys that are currently in memory.

DescribeTopHotKeys

Gets the top 20 hot keys over a specified period.

DescribeTopBigKeys

Gets the top 20 large keys over a specified period.

DescribeHotKeys

Gets the hot keys of a Redis instance.

FAQ

  • Q: Why are String-type keys displayed under Large key (by number of elements)?

    A: In Redis Open-Source Edition and some earlier versions of Tair, String-type keys are displayed if their value length exceeds the threshold, which defaults to 2,000.

  • Why does a key with fewer than 10 elements appear as a large key?

    The most likely cause is that the key name itself is large. Run memory usage key_name to check its actual memory footprint. If the result is unexpectedly high, consider renaming or restructuring the key.

    A less common cause is an outdated minor version. Instances with a minor version earlier than 5.2.7 have a default bigkey-threshold of 0, which causes keys with small memory usage to appear as large keys. Upgrade the minor version to resolve this.