How does a single thread run on multiple cores?

1.39K views

REDIS is single threaded. So what does it mean when I deploy it to machines with 2 or more cores? How does the single thread utilize these multiple cores?

In: Engineering

3 Answers

Anonymous 0 Comments

A thread can only run on one core. But it doesn’t have to be the same core every time it runs. It can use core 1, then core 2, then core 1, then core 2 – the thread doesn’t really notice.

Sometimes other parts of the operating system have their own threads, so it might still be faster on a dual core machine than a single core machine, even though redis is only using one core at a time.

You are viewing 1 out of 3 answers, click here to view all answers.