3 ms·
> in Redis is easy because everything is in memory Only by recommendation. You merely advise users not to allocate a DB larger than available memory. There's
by otterley 16y ago
> in Redis is easy because everything is in memory
Only by recommendation. You merely advise users not to allocate a DB larger than available memory. There's no built-in protection against overcommit, at least last time I checked (the documentation has been reorganized recently and I can't find the page that has the command-line arguments anymore).
One could create a capped collection in MongoDB that was smaller than memory to achieve the same effect.
- antirez 16y agoSure there is, check 'maxmemory' directive. Especially in 2.2 it was extended a lot. You can configure it to simply trow error on writes once the limit is reached.
- otterley 16y agoMy point is that Redis doesn't automatically size maxmemory itself. Novice users can trivially make Redis perform awfully if their working set exceeds available RAM. (I don't consider this a flaw in Redis, BTW - it's just that a lot of implementors really don't understand operating systems and VM overcommit.)