Optimal Redis max memory size?

413 views
Skip to first unread message

Paul S

unread,
Jan 7, 2016, 11:50:16 AM1/7/16
to Redis DB
Hello,

I have a number of linux machines to run Redis as standalone instances (no cluster).
Each host has 128 Gb RAM out of which 96 Gb will be dedicated to Redis.

I can run several Redis instances per host. It could be 3x32Gb, 4x24Gb, or 6x16Gb.
Any idea on which of these configurations will be the best from a performance point of view?

Thank you,
Paul

alb...@demonware.net

unread,
Jan 7, 2016, 7:43:42 PM1/7/16
to Redis DB
I don't beleive there would be any major differences from a memory performance point of view with any of the options. More experience Redis developers might know better, but I've never seen any disclaimers about trying to optimize on that dimension. On the ohter hand, each Redis instance will only primarily run on a single core, with the potential to use a second core for the persist to disk work. As a result you might get more performance sharding enough to make use of more cpus cores on the machine. If your use cases end up being bandwidth / io bottlenecked, getting the extra cpu performance might not make much of an impact anyway. 

If you were to push it even further, and did 24 x 4gb you would be able to get away with using a 32bit build of redis. This is a lot more efficient when dealing with lots of small keys, where the pointer itself is a noticeable portion of the size. Not sure on how that would overall effect performance in your use case though, and what the trade offs for running more redis instances than cpu cores would be. If you're more ram bound than cpu bound, I could see it being worth it in some cases in theory, but you'd need to verify with more appropriate testing for your use cases. 

Greg Andrews

unread,
Jan 7, 2016, 8:04:32 PM1/7/16
to redi...@googlegroups.com
Do you envision these Redis instances replicating from each other, or are they all independent?

  -Greg

--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Paul Sydell

unread,
Jan 7, 2016, 8:05:33 PM1/7/16
to redi...@googlegroups.com
They all independent, no replication.
A client does sharding across all instances.

saurabh

unread,
Jan 7, 2016, 9:54:51 PM1/7/16
to redi...@googlegroups.com
Multiple redis instances on a host will give you performance gains only if redis is being bottlenecked by the CPU. Since Redis is single-threaded, all but one cores are unutilized if you run only one instance on one host. So, if you observe that CPU is a bottleneck, you could choose to run multiple instances to utilize the remaining cores.

Paul Sydell

unread,
Jan 8, 2016, 11:22:37 AM1/8/16
to redi...@googlegroups.com
Thank you all for your answers
I understand the trade-offs here and we're going to do a perf. test on different setups.
Just was curious if anyone already went through the same exercise.
Paul
Reply all
Reply to author
Forward
0 new messages