In TencentDB for Redis cluster mode, if slot sharding is uneven, data and query skew may occur. Some Redis nodes with Large Keys may occupy more memory and network interface resources, causing Redis congestion.
Memory analysis primarily focuses on analyzing Large 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 Large Keys in terms of memory usage, element count, length, and expiration time. This helps Ops personnel quickly identify Large Keys, split or expire them, and optimize database performance promptly, avoiding service performance degradation, memory shortages, and potential business disruptions caused by Large Keys.
Memory Analysis Usage Instructions
Memory analysis provides Periodic Big Key Analysis and Ad Hoc Analysis of Big Key:
Periodic Big Key Analysis: When using Large Key Analysis for the first time, enable the Large Key Analysis feature on the Instance Management page. Once the feature is enabled, the system will automatically initiate a Large Key Analysis task the next day, with the results displayed in Memory Analysis > Big Key Analysis. Subsequently, a routine analysis task will be performed daily, and the data results will be updated accordingly.
Ad Hoc Analysis of Big Key: After a real-time Large Key Analysis task is created, a backup is immediately generated to collect the latest data. The analysis results can be viewed on the Ad Hoc Analysis of Big Key tab task list or on the Big Key Analysis tab. The results are retained for 30 days by default.
If the Large Key Analysis feature is not enabled on the Instance Management page before the real-time Large Key Analysis task is created, the data under the Big Key Analysis tab will be displayed for the first time.
Limits
Redis 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 Large Key Analysis (Periodic Large Key Analysis)
2. Enable the Large Key Analysis feature.
Enabling Instance Large Key Analysis on the Instance Analysis Page
2.1.1 In the left sidebar, select Instance Management, and select the Redis instance.
2.1.2 Enable the Large Key Analysis feature using one of the following three methods.
Method 1: Select the instances for which you want to enable Large Key Analysis in the instance list, and click batch setting at the top-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.
Enabling Instance Large Key Analysis on the Memory Analysis Page
2.1.1. In the left sidebar, select Performance Optimization.
2.1.3 Select Memory Analysis > Big Key Analysis, and select the Redis Data Type and Instance ID.
2.1.4 Click regular analysis setting in the top-right corner of the page.
3. In the pop-up dialog box, enable Top 100 Big Key Regular Analysis, Separators, and click OK.
Note:
After you enable Top 100 Big Key Regular Analysis, the Performance Optimization > Memory Analysis > Big Key Analysis tab will display analysis results in three dimensions: Top 100 Big Keys (by MEM Usage), Top 100 Big Keys (by Element Quantity), and Top 100 Key Prefixes.
After a delimiter is specified,Top 100 Key Prefixes statistics are based on the key prefixes split by the specified delimiter and sorted by memory usage.
Creating Real-Time Large Key Analysis Task
2. In the left sidebar, choose Performance Optimization.
3. At the top of the page, select a Redis instance.
4. Select Memory Analysis tab, and select Ad Hoc Analysis of Big Key.
5. Click Create Task, select a delimiter and shard ID in the pop-up dialog box, and click OK.
You can click View All Nodes in the Operation column to view all node IDs.
Once the task is created, DBbrain will automatically generate a backup and perform automated analysis.
6. In the task list, when the task progress reaches 100%, click View in the Operation column to view the analysis results in a pop-up on the right.
The task analysis results display the Top 100 Big Keys (by MEM Usage), Top 100 Big Keys (by Element Quantity), and Top 100 Key Prefixes in three dimensions, and allow viewing results from both instance and shard dimensions.
Note:
The analysis results generated by the real-time Large Key Analysis task are also available in the Large Key Analysis tab. For more details, see Viewing Large Key Analysis Results. The Operation column in the task list also supports the following operations:
Download task analysis results: Click Download to export the Top 100 Large Key Analysis results in .csv format.
Delete real-time Big Key Analysis tasks:
Single deletion: Click Delete, and in the pop-up dialog box, click OK.
Batch deletion: Select tasks in the task list, click Delete at the top of the list, and in the pop-up dialog box, click OK.
Viewing the Large Key Analysis Result
2. In the left sidebar, choose Performance Optimization.
3. At the top of the page, select a Redis instance.
4. Select Memory Analysis tab, then select Big Key Analysis tab.
5. View the Large Key Analysis results, including a MEM Utilization (Last 30 Days) trend chart and Top 100 Big Key statistics.
Note:
In 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 Large Key list will then dynamically show the Large Key information for that day, allowing you to quickly identify keys consuming high memory on that date.
MEM Utilization (Last 30 Days)
Supports viewing historical memory usage over 30 days by instance or shard (for multi-shard instances only).
Select a specific time range on the timeline to zoom in and view memory usage trends for that period.
Top 100 Big Keys
In the Data Type dropdown menu, select a data storage type to view Top 100 Large Key information, including memory usage, element count, maximum element length, average element length, and expiration time.
Top 100 Big Keys (by MEM Usage): Lists the Top 100 Large Keys ranked by memory usage in descending order.
Top 100 Big Keys (by Element Quantity): Lists the Top 100 Large Keys ranked by element count in descending order.
Top 100 Key Prefixes: Lists the Top 100 Key Prefixes ranked by memory usage in descending order.