假设我的 Sorted Set 的平均元素是 X 字节,我需要计算 Redis SortedSet 占用多少内存。
1 回答
0
If you know the average size of an element before it's stored in redis, just do this:
- Clear redis of all data: command
flushall(dumps all databases) - Command
info, check fieldused_memory_human(should be zero or close to it) - Add/store data in redis
infoagain, checkused_memory_human, size indicates memory used by redis to store objects.
Hope it helps
于 2013-08-21T18:29:11.760 回答