Alex Rivera | Logout

Memory utilization in redis for each database

Asked 2012-11-02T02:52:15.627
11

Redis allows storing data in 16 different 'databases' (0 to 15). Is there a way to get utilized memory & disk space per database. INFO command only lists number of keys per database.

Edit
Report

1 Answer

5

No, you can not control each database individually. These "databases" are just for logical partitioning of your data.

What you can do (depends on your specific requirements and setup) is spin multiple redis instances, each one does a different task and each one has its own redis.conf file with a memory cap. Disk space can't be capped though, at least not in Redis level.

Side note: Bear in mind that the 16 database number is not hardcoded - you can set it in redis.conf.

answered 2012-11-02T05:32:42.247

Your Answer