Redis: Show database size/size for keys

前端 未结 9 1798
青春惊慌失措
青春惊慌失措 2020-12-12 11:26

My redis instance seems to being growing very large and I\'d like to find out which of the multiple databases I have in there consumes how much memory. Redis\' INFO

9条回答
  •  余生分开走
    2020-12-12 12:04

    So my solution to my own problem: After playing around with redis-cli a bit longer I found out that DEBUG OBJECT reveals something like the serializedlength of key, which was in fact something I was looking for...

    For a whole database you need to aggregate all values for KEYS * which shouldn't be too difficult with a scripting language of your choice...

    The bad thing is that redis.io doesn't really have a lot of information about DEBUG OBJECT.

提交回复
热议问题