master-replica Redis Hotkey Analysis
Background Information
URedis is based on the Least Frequently Used (LFU) algorithm and identifies the hot keys of the current instance through efficient sorting and statistical algorithms.
Precautions
- The URedis versions that support scanning of large keys are master-replica versions 4.0, 5.0, 6.0, 7.0.
- The result files generated after hotkey analysis are retained for only 24 hours and cannot be downloaded after this period. Only one hotkey analysis task can be executed at a time.
- Hotkey analysis will increase the load on the master instance. Before running hotkey analysis, it is important to evaluate whether it will impact the instance's performance.
- By default, hotkey analysis identifies the top 100 hotkeys. If multiple hotkeys have the same frequency, only the first scanned hotkeys will be displayed.
- Prior to conducting hotkey analysis, ensure that the configuration parameter "maxmemory-policy" is set to "allkeys-lfu" or "volatile-lfu."
Operation Steps
-
Go to the "UMem Redis" product page.
-
Select the master-replica Redis product, find "Hotkey Analysis" in the More button, and click to confirm execution.
-
You will automatically be redirected to the Scheduled Task Management page.
-
After the task is successfully executed, the task status changes to success. You can then click the download button to download the hotkey analysis file.
-
After the download is complete, you can view the hotkey analysis file. The result file is divided into two parts.
- Part one: Display detailed information of the hotkey, with a total of 3 columns. The first column is the db where the key is located, the second column is the access heat of the key, and the third column is the key name.
- Part two: The number of hotkeys.