I am using Redis on virtual machines and having trouble deciding how many cores should I assign to them.
I know that Redis uses single thread to serve requests, but documentation also states that some tasks performed in background by different threads/processes.
I can assign more cores than needed without wasting resources, but I don't like the idea of going over theoretical limit, which I assume exists in this case.
So far I came up with this:
- 1 core for serving actual requests
- 1 core if https://redis.io/topics/persistence is enabled (RDB or AOF or both)
- 1 core for asyc memory reclaiming with https://redis.io/commands/unlink (additionaly I believe I read somewhere that DEL behaves in the same way if key size exceeds some threshold)
- 1 core for OS
Did I miss something, are there any other tasks where Redis can utilize additional cores? Perhaps replication or streams?