We have deployed Redis on a Kubernetes cluster running on an Ubuntu VM with 16GB of RAM and 4 CPU cores. After the environment runs continuously for about two weeks, we notice that the Redis server's CPU usage spikes to 90-100%.
The Redis instance holds around 10,000 keys and has approximately 20 client connections. The Redis memory usage is 77MB.
Configuration details:
Redis version: redis-stack-server:6.2.6-v9 OS: Ubuntu 22.04.3 LTS (GNU/Linux 6.5.0-44-generic x86_64) VM Specs: 16GB RAM, 4 CPU Cores Kubernetes: Microk8s version: v1.26.15
Interestingly, The CPU usage does not decrease even after reducing the number of keys to 15. However, when all client connections to Redis are closed, the CPU usage drops. But as soon as any client reconnects to the Redis server, the CPU usage quickly rises again to 80-100%.
The issue is temporarily resolved by restarting the Redis pod, but it reoccurs after some time(2 weeks). Whar could be the issue?
Comment From: sundb
did you use sentinel?
did you use strace to see what Redis was doing at that time?
Comment From: hemangi225
@sundb Thanks for reply. 1. No, we are not using sentinel here. 2. No, Is there any configuration setting for this?