Redis and multicore servers

748 views
Skip to first unread message

Christian van der Leeden

unread,
Nov 21, 2010, 2:24:51 PM11/21/10
to redi...@googlegroups.com
Hi,

can redis make effective use of multicore servers?
We're running it on a large EC2 instances with 4 cores and a lot of RAM.
I've read here that redis basically access the data in its core in a sequential
fashion. So is there a rule of thumb, e.g. one core per redis instance?
Or is redis running multiple worker threads depending on the # of cores?

In nginx you can tell the system how many cores you have and it will launch the
workers accordingly..

Christian

Konstantin Merenkov

unread,
Nov 21, 2010, 3:18:18 PM11/21/10
to redi...@googlegroups.com
Hi,

You run one instance of redis per core.

> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>

--
Best Regards,
Konstantin Merenkov

Jak Sprats

unread,
Nov 22, 2010, 5:06:16 AM11/22/10
to Redis DB

> You run one instance of redis per core.
and use consistent hashing in your redis client

If you have 4 cores (and 1 NIC), using 2 cores for redis yields
optimal performance.
> > For more options, visit this group athttp://groups.google.com/group/redis-db?hl=en.

Demis Bellot

unread,
Nov 22, 2010, 5:36:40 AM11/22/10
to redi...@googlegroups.com
If you have 4 cores (and 1 NIC), using 2 cores for redis yields optimal performance.

Is this right? I always thought on paper that 1 instance per core was the most efficient. I'm assuming the 2nd core is only useful when doing background saves? Its probably a good idea to ask if Redis uses a separate thread for IO?

- Demis

Josiah Carlson

unread,
Nov 22, 2010, 10:48:32 AM11/22/10
to redi...@googlegroups.com
It has to do with what processor is handling the network traffic. Jak
posted benchmarks on it in the last couple months, search the
archives.

- Josiah

Christian van der Leeden

unread,
Nov 22, 2010, 2:13:48 PM11/22/10
to redi...@googlegroups.com
Hi,

thanks for all the answers, I'll size accordingly :-)

Christian

Reply all
Reply to author
Forward
0 new messages