-1

I am needing to set up a Redis server, how much RAM do I need to allow for the server?

Queencity13
  • 137
  • 1
  • 3
  • 6

3 Answers3

5

I would recommend installing redis on something, your laptop, whatever you have available now.

Then generate some nontrivial amount of data shaped like what you plan to store on the eventual server. Say 100,000 values. Then, load that into redis in the way you expect your application to.

Then, see how much memory redis is using:

redis-cli info | grep "used_memory"

And use that to estimate how much memory you will need based on the amount of data you want to plan for. You need to leave some spare memory for the OS and other core systems to function. I would leave at least a couple GB of memory for those.

If you run redis at half or more of the system memory you will want to read about enabling this in your /etc/sysctl.conf file:

vm.overcommit_memory

There is more information about why that is necessary on the redis FAQ:

http://redis.io/topics/faq

There are tricks for getting more data into redis using certain data structures to limit memory usage. You can read about that on their FAQ and blog.

gtuhl
  • 181
  • 2
  • 7
2

all depends on the amount of data you store

Mike
  • 21,910
  • 7
  • 55
  • 79
2

I'm buying a car, how many seats do I need?

In general, take whatever you think you might possibly need and double it. Hardware is cheap. It's a lot easier to drive around with a few extra seats than it is to add seats later.

Ryan
  • 912
  • 6
  • 12