tencent cloud

Memory Analysis (Big Key Analysis)
Last updated:2026-03-19 18:55:31
Memory Analysis (Big Key Analysis)
Last updated: 2026-03-19 18:55:31
In Tencent Cloud Distributed Cache cluster mode, if slot sharding is uneven, data and query skew may occur. Some Redis nodes with big keys may occupy more memory and network interface resources, causing Tencent Cloud Distributed Cache congestion.
Memory analysis primarily focuses on analyzing big keys stored in the database. It dynamically displays changes in the instance's memory utilization trends and provides real-time statistics for the top 100 big keys in terms of memory usage, element count, length, and expiration time. This helps Ops personnel quickly identify big keys, split or expire them, and optimize database performance promptly, avoiding service performance degradation, memory shortages, and potential business disruptions caused by big keys.

Usage Instructions for Memory Analysis

Memory analysis provides two methods: periodic analysis of big keys and ad hoc analysis of big keys.
Periodic analysis of big keys: For first-time use, enable the big key analysis feature on the Instance Management page. Once the feature is enabled, the system automatically initiates a big key analysis task on the next day and displays the results in Memory Analysis > Big Key Analysis. Subsequently, a routine analysis task will be performed daily, and the data results will be updated accordingly.
For detailed steps on enabling the big key analysis feature and viewing the analysis results, see Enabling Big Key Analysis and Viewing the Big Key Analysis Results.
Ad hoc analysis of big keys: A backup is automatically created immediately after an ad hoc big key analysis task is created. Since the latest data is fetched, the generated analysis results can be viewed in the task list on the Ad Hoc Analysis of Big Key tab, or on the Big Key Analysis tab. Analysis results are saved for 30 days by default.
If the big key analysis feature is not enabled on the Instance Management page before you create an ad hoc big key analysis task, data under the Big Key Analysis tab is displayed for the first time.
For detailed steps on creating an ad hoc big key analysis task and viewing the analysis results, see Creating an Ad Hoc Big Key Analysis Task and Viewing the Big Key Analysis Results.

Use Limits

Tencent Cloud Distributed Cache instances with storage exceeding 100 GB do not support Periodic Big Key Analysis. However, memory analysis can be conducted by creating Ad Hoc Analysis of Big Key tasks.

Enabling Big Key Analysis (Periodic Big Key Analysis)

2. Enable the big key analysis feature.
2.1 Enabling the big key analysis feature for an instance on the instance list page
2.1.1 In the left sidebar, select Instance Management, and select the Distributed Cache instance.
2.1.2 Enable the big key analysis feature using one of the following three methods:
Method 1: In the instance list, select the instance for which you want to enable the big key analysis feature, and then click Batch Setup in the upper-left corner of the page.

Method 2: In the Status column of the target instance, click

.

Method 3: In the Operation column of the target instance, click Configuration.

2.2 Enabling the big key analysis feature for an instance on the memory analysis page
2.1.1. In the left sidebar, select Performance Optimization.
2.2.1 Choose Memory Analysis > Big Key Analysis, and select the Distributed Cache Data data type and instance ID.
2.2.2 In the upper-right corner of the page, click Periodic Analysis Settings.
3. In the pop-up dialog box, enable Top 100 Big Key Regular Analysis, Separators, and click OK.

Note:
After Top 100 Big Key Analysis is enabled, choose Diagnosis Optimization > Memory Analysis > Big Key Analysis. The big key analysis results will be displayed based on five dimensions: Top 100 Big Keys (by Memory), Top 100 Big Keys (by Quantity), Top 100 Key Prefixes, Top 100 Big Keys Not Set to Expire (by Memory), and Top 100 Big Keys Not Set to Expire (by Quantity).
After separators are specified, the Top 100 Key Prefixes tab will aggregate information of key prefixes based on the specified separators and sort the resulting key prefixes by memory usage.

Creating an Ad Hoc Big Key Analysis Task

1. Log in to the DBbrain console.
2. In the left sidebar, select Performance Optimization.
3. At the top of the page, select a Distributed Cache instance.
4. Select the Memory Analysis tab, and select Ad Hoc Analysis of Big Key.



5. Click Create Task. In the pop-up dialog box, select separators and shard IDs, and click OK.
Note:
Standard architecture instances: You only need to select separators. After the task starts, a Distributed Cache backup task is created, and big key analysis is performed based on the backup data. Analysis results are saved for 30 days by default. If the data volume is too large, the analysis task may fail.
Cluster architecture instances: You need to select separators and shards. After the task starts, a Distributed Cache backup task is created based on the selected shards, and big key analysis is performed based on the backup data. Analysis results are saved for 30 days by default. If the data volume is too large, the analysis task may fail.

You can click View All Nodes in the Operation column to view all node IDs.
6. View the task progress in the task list.
Note:
To terminate a task during its creation process, click Terminate in the Operation column, and then click OK in the pop-up dialog box.
7. When the task progress is Completed, click View in the Operation column to view the analysis results in a pop-up window on the right.
The task analysis results display the big key analysis results in the following dimensions: Key Expiration Time Distribution (by Memory), Key Expiration Time Distribution (by Quantity), Top 100 Big Keys (by Memory), Top 100 Big Keys (by Quantity), Top 100 Key Prefixes, Top 100 Big Keys Not Set to Expire (by Memory), and Top 100 Big Keys Not Set to Expire (by Quantity). These results can be viewed from both instance and shard dimensions.
Note:
The analysis results generated by the ad hoc big key analysis task can also be viewed in the Big Key Analysis tab. For more instructions and operations, see Viewing the Big Key Analysis Results.
The Operation column in the task list also supports the following operations:
Download the analysis results of a task: Click Download to download the top 100 big key analysis results in .csv format.
Delete ad hoc big key analysis task:
Delete a single task: Click Delete, and click OK in the pop-up dialog box.
Batch delete tasks: Select the tasks in the list, click Delete above the list, and click OK in the pop-up dialog box.

Viewing the Big Key Analysis Results

1. Log in to the DBbrain console.
2. In the left sidebar, select Performance Optimization.
3. At the top of the page, select a Distributed Cache instance.
4. Choose Memory Analysis > Big Key Analysis, and select an instance or shard (which is only involved in the cluster architecture).
5. View the big key analysis results, such as the trend chart of memory utilization for the last 30 days and the top 100 big key statistics.
Note:
On the MEM Utilization (Last 30 Days) trend chart, the memory utilization trends of the instance over the last 30 days are displayed by default. Click a specific date on the horizontal axis to fix the timeline. The Top 100 Big Keys list then dynamically displays the big key information for the day, allowing you to quickly identify keys consuming high memory on the date.
MEM Utilization (Last 30 Days)
Supports viewing memory utilization over the last 30 days by instance or shard (only applicable to multi-shard instances).
Select a specific time period on the timeline to zoom in and view the trend of memory utilization changes during the period.
Key Expiration Time Distribution
Key expiration time distribution is counted by memory usage and number of keys, covering keys not set to expire and set to expire (with the expiration time ranging from 3 to 12 hours, 1 to 3 days, or more than 7 days).
Top 100 Big Keys
In the Data Type drop-down list, select the type of data storage to view information about the top 100 big keys, including memory usage, number of elements, maximum element length, average element length, and expiration time.
Top 100 Big Keys (by Memory): lists the top 100 big keys sorted by memory usage in descending order.
Top 100 Big Keys (by Quantity): lists the top 100 big keys sorted by the number of elements in descending order.
Top 100 Key Prefixes: lists the top 100 key prefixes sorted by memory usage in descending order.
Top 100 Big Keys Not Set to Expire (by Memory): lists the top 100 big keys not set to expire, sorted by the memory usage in descending order.
Top 100 Big Keys Not Set to Expire (by Quantity): lists the top 100 big keys not set to expire, sorted by the number of keys in descending order.
6. Click

in the upper-right corner of the list to download the file in .csv format.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback