Updated on 2024-11-26 GMT+08:00

How Do I Detect Big Keys and Hot Keys in Advance?

Method

Description

Through Big Key Analysis and Hot Key Analysis on the DCS console

See Analyzing Big Keys and Hot Keys.

By using the bigkeys and hotkeys options on redis-cli

  • redis-cli uses the bigkeys option to traverse all keys in a Redis instance and returns the overall key statistics and the biggest key of six data types: Strings, Lists, Hashes, Sets, Zsets, and Streams. The command is redis-cli -h <Instance connection address> -p <Port number> -a <Password> --bigkeys.
  • In Redis 4.0 and later, you can use the hotkeys option to quickly find hot keys in redis-cli. Run this command during service running to find hot keys: redis-cli -h <Instance connection address> -p <Port number> -a <Password> --hotkeys. The hot key details can be obtained from the summary part in the returned result.