Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like redis because it lets me do operations on data structures. I wanted to see what would happen if i were to put more data into redis then i have for ram. So i wrote a loop that inserted 30k bytes repeatedly and set maxmemory 100MB. I figure it would stay at 100mb. It kept growing. Past 1gb then past 2gb. Suddenly it crashed because i ran the 32bit version.

Now... i dont understand what the point of maxmemory is? I am using the windows version so maybe its ignored. Does redis have to have everything in memory? If i have a site (on linux) with a 10gb database and 512mb on the machine will redis work? I don't need it to be amazingly fast i just prefer to modify data in it then sql (although i hope it is still faster then mysql)

share|improve this question
up vote 2 down vote accepted

The point of maxmemory is to set the maximum amount of memory Redis will use. However, you've put it in an impossible situation, asking it to store more information than can possibly fit in the memory allotted. If you give Redis some way to free memory, it will. But if no objects are discardable, there's nothing it can do.

"Note that the [maxmemory] setting is really only a good idea when using Redis as a cache. If you are using it as a general database, you will need to monitor its memory consumption and take action before too many resources are consumed."

share|improve this answer
blah, right now i'm thinking exactly what tom newton (other answer) said. – acidzombie24 Sep 3 '12 at 21:24

Redis is an in-memory database, you are probably better off looking at something designed to be "on disk", though there are some really nice aspects of redis I have struggled to find elsewhere :(

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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