ApsaraDB for Redis integrates the key analysis feature of Database Autonomy Service (DAS). The real-time key statistics feature allows you to view large keys and hotkeys in instances in real time. It also allows you to query the large keys and hotkeys that were generated within the past four days. You can use this feature to obtain key information, such as memory usage and access frequency of keys, and optimize the instance based on the information.
- The instance is an instance of the ApsaraDB for Redis Community Edition whose major version is 5.0 or 6.0 or a performance-enhanced instance of the ApsaraDB for Redis Enhanced Edition (Tair). For more information about performance-enhanced instances, see Performance-enhanced instances.
- The instance is updated to the latest minor version. For more information, see Update the minor version.
|large key||ApsaraDB for Redis sorts list, hash, set, and zset keys based on the number of elements
in these keys. ApsaraDB for Redis considers the top three keys that have the most
elements as large keys. If two keys have the same number of elements, the key that
first reaches this number of elements ranks higher.
|hotkey||ApsaraDB for Redis uses efficient sorting and statistical algorithms based on the
Least Frequently Used (LFU) cache to identify hotkeys in an instance.
- 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.
- In the left-side navigation pane, choose .
- Click the Real-time tab to view real-time data or click the History tab to view historical
data based on your business requirements. Note
- If the instance is a cluster instance or a read/write splitting instance, you can select a node from the Current Node drop-down list.
- If the QPS of a key reaches 6,000, the system stops calculating the accurate QPS of the key. In this case, >=6000 is displayed for such a hotkey in the Access Frequency column.
- On the History tab, you can query the historical large keys and hotkeys within the past four days. The time range to query cannot exceed three hours. For example, if the current time is 16:00 on July 15, 2021, you can query the large keys and hotkeys from 16:00 on July 11 to 16:00 on July 15. If you set the beginning of the time range to query to 16:00 on July 11, the end of the time range to query cannot be later than 19:00 on July 11.
Related API operations
|DescribeHotBigKeys||Queries the hotkeys and large keys in the memory in real time.|
|DescribeTopHotKeys||Queries the top 20 hotkeys over a period of time.|
|DescribeTopBigKeys||Queries the top 20 large keys over a period of time.|
|DescribeHotKeys||Queries the hotkeys of an ApsaraDB for Redis instance.|