0

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:

Did I miss something, are there any other tasks where Redis can utilize additional cores? Perhaps replication or streams?

0

Redis is, mostly, a single-threaded server from the POV of commands execution (actually modern versions of Redis use threads for different things). Please go through below links. How fast is Redis?. There is also one same post on stackoverflow - Redis is single-threaded, then how does it do concurrent I/O?

  • Im sorry but it seems like you didnt read my post past the title. I know that Redis is single threaded and I know that it can perform different things in separate threads. The question is - "what things?" And neither your answer nor the links you provide has any information on that. – chimmi Apr 26 at 11:16
  • if i am correct, you want total number of cpus, redis can use ? we can use multi thread redis. – sanjayparmar Apr 26 at 12:15
0

Please check this url https://redis.io/topics/benchmarks,

"Redis is not designed to benefit from multiple CPU cores. People are supposed to launch several Redis instances to scale out on several cores if needed. It is not really fair to compare one single Redis instance to a multi-threaded data store."

"CPU is another very important factor. Being single-threaded, Redis favors fast CPUs with large caches and not many cores. At this game, Intel CPUs are currently the winners. It is not uncommon to get only half the performance on an AMD Opteron CPU compared to similar Nehalem EP/Westmere EP/Sandy Bridge Intel CPUs with Redis. When client and server run on the same box, the CPU is the limiting factor with redis-benchmark."

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.