2

假设我的 Sorted Set 的平均元素是 X 字节,我需要计算 Redis SortedSet 占用多少内存。

4

1 回答 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 field used_memory_human (should be zero or close to it)
  • Add/store data in redis
  • info again, check used_memory_human, size indicates memory used by redis to store objects.

Hope it helps

于 2013-08-21T18:29:11.760 回答