Help Center > > User Guide> Managing DCS Instances> Analyzing Big Keys and Hot Keys

Analyzing Big Keys and Hot Keys

Updated at: Mar 17, 2020 GMT+08:00

By performing big key analysis and hot key analysis, you will have a picture of keys that occupy a large space and the most frequently accessed keys.

  • Big key analysis is supported by all DCS Redis instances. Hot key analysis is supported only by DCS Redis 4.0 and 5.0 instances whose maxmemory-policy parameter is set to allkeys-lfu or volatile-lfu.
  • During big key analysis and hot key analysis, all keys will be traversed. The larger the amount of keys, the longer the analysis takes.
  • Perform big key analysis during off-peak hours and avoid automatic backup periods. Perform hot key analysis shortly after peak hours to ensure the accuracy of the analysis results.
  • For master/standby and cluster instances, the big key analysis is performed on the standby nodes, so the impact on the instance is minor. For single-node instances, both big key and hot key analysis are performed on the only node of each instance and will reduce the instance access performance by up to 10%.
  • A maximum of 100 analysis records are retained for each instance. When this limit is reached, the oldest record will be deleted to make room for new records. You can also manually delete records you no longer need.

Big Key Analysis

  1. Log in to the DCS console.
  2. Click in the upper left corner of the management console and select a region and a project.

    Select the same region as your application service.

  3. In the navigation pane, choose Cache Manager.
  4. Click the name of a DCS Redis instance.
  5. Click the Cache Analysis tab.
  6. On the Big Key Analysis tab page, manually perform big key analysis or schedule daily automatic analysis.
  7. After an analysis task completes, click View to view the analysis results.

    You can view the analysis results of different data types.

    Figure 1 Viewing the results of big key analysis

Hot Key Analysis

  1. Log in to the DCS console.
  2. Click in the upper left corner of the management console and select a region and a project.

    Select the same region as your application service.

  3. In the navigation pane, choose Cache Manager.
  4. Click the name of a DCS instance.
  5. Click the Cache Analysis tab.
  6. On the Hot Key Analysis tab page, manually perform hot key analysis or schedule daily automatic analysis.

    The default value of the maxmemory-policy parameter of a Redis 4.0 or 5.0 instance is noeviction. To perform hot key analysis, set this parameter to allkeys-lfu or volatile-lfu. If this parameter has already been set to allkeys-lfu or volatile-lfu, perform hot key analysis right away.

  7. After an analysis task completes, click View to view the analysis results.

    The hot key analysis results are displayed.

    Figure 2 Viewing the results of hot key analysis
    Table 1 Results of hot key analysis

    Parameter

    Description

    Key

    Name of a hot key.

    Type

    Type of a hot key, which can be string, hash, list, set, or sorted set.

    Size

    Size of the hot key value.

    FREQ

    Reflects the access frequency of a key within a specific period of time.

    FREQ is the logarithmic access frequency counter. The maximum value of FREQ is 255, which indicates 1 million access requests. After FREQ reaches 255, it will no longer increment even if access requests continue to increase. FREQ will decrement by 1 for every minute during which the key is not accessed.

    DataBase

    Database where a hot key is located.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel