Reasons for Redis to slow down

There is no simple answer to this question. With all NoSQL or SQL based storage solutions, there are plenty of conditions that could result in high latency or slowness of the storage engine. Redis is no exception.

I would suggest to start by reading:

  • How fast is Redis?
  • Redis latency problems troubleshooting

Here is a non exhaustive list of potential reasons:

  • Inadequate hardware (network, memory, CPU)
  • Software based virtualization (Xen on low-end hardware for instance)
  • Not enough memory, generating swapping at the OS level
  • Too many O(n) operations (like KEYS) executed in the single-threaded engine
  • Large objects stored in Redis, leading to uncontrolled expansion of the communication buffers
  • Huge number of simultaneous sessions (>30000)
  • Too many connection operations per second (Redis is not a webserver, connections are supposed to be permanent, not transient).
  • Too many roundtrips generated by the client application (no pipelining or aggregated command usage)
  • Large fork operations generated by bgsave or AOF rewrite (especially on VMs)
  • I/O related latencies when AOF is used
  • Accumulation of many expire operations triggered at the same time
  • Accumulation of memory in client and master/slave communication buffers, or slow log data
  • TCP incast conditions when network bandwidth consumption is significant
  • Using distributed storage (and especially cloudy ones such as EC2 EBS) to store dump or AOF files

There are probably many other reasons, related to the workload generated by your own application.

If some people think about other general reasons, we can add them to this list.