How to Troubleshoot Latency Issues?

Last updated 18, Apr 2024

Symptoms

Users are facing latency or timeouts with Redis Enterprise or Redis Cloud databases.

Troubleshooting

Check for long-running commands

Use the command slowlog get <number of entries> with-complexity and try to correlate the entries and the time of the latency or timeout. For example:

redis-cli -h <DATABASE_ENDPOINT> -p <DATABASE_PORT> -a <PASSWORD> slowlog get 200 with-complexity

Where:

  • DATABASE_ENDPOINT is the database endpoint FQDN.
  • DATABASE_PORT is the database listening port
  • PASSWORD  is the database password

Complexity

The cause of the long-running command could be due to the high complexity of the operation (O(n)) or big keys (keys containing large data size (for example, string above 1MB) or collections such as Hashes, Sets, or Lists having members (for example, more than 10K members).

Resources

  • Check your client application server CPU level; we recommend keeping the level below 80%. And consider increasing resources accordingly.
  • Check the Redis Enterprise Cluster nodes’s CPU, shards, and the dmcproxy levels. We recommend keeping the level below 80%
  • Consider increasing resources and adding more shards accordingly.
  • Check your environment networking. Using external tools like TCPdump or other analysis tools to measure the request and response time and identify the bottleneck.

References

For more information about the slow log in Redis Enterprise, please refer to the article View Redis slow log For more monitoring tools, please refer to the slow log panel of RedisInsight