tags:

views:

242

answers:

1

Hello,

I'm rather new to Redis and before using it I'd like to learn some important (as for me) details on it. So....

Redis is using RAM and HDD for storing data. RAM is used as fast read/write storage, HDD is used to make this data persistant. When Redis is started it loads all data from HDD to RAM or it loads only often queried data to the RAM? What if I have 500Mb Redis storage on HDD, but I have only 100Mb or RAM for Redis. Where can I read about it?

Thank you

PS: Sorry for my English

+1  A: 

Redis loads everything into RAM. All the data is written to disk, but will only be read for things like restarting the server or making a backup.

There are a couple of ways you can use it with less RAM than data though. You can set it up in combination with MySQL or another disk based store to work much like memcached - you manage cache misses and persistence manually.

Redis has a VM mode where all keys must fit in RAM but infrequently accessed data can be on disk. However, I'm not sure if this is in the stable builds yet.

Tom Clarkson
Very useful, but where from do you know about VM mode? Can't find it in documentation. Or you are checking source code of new builds?
Kirzilla
http://antirez.com/post/redis-virtual-memory-story.html
Tom Clarkson