DEBUG looks at the memory of a key in redis

1. The production environment needs to check the memory footprint of the hash object corresponding to a key.
execute DEBUG OBJECT key, to get the following information:
Value at:0x7f7bec732940 refcount:1 encoding:hashtable serializedlength:8506376 lru:9232585 lru_seconds_idle:4

2. I would like to ask serializedlength this parameter represents the length of serialization, should be memory compression, do not know the number of units of this parameter,
8506376 about how much memory?

May.22,2021
The unit of

is B, or Byte (bytes), and the corresponding memory is about 8.11m.


byte.

Note that this is compressed and does not necessarily reflect the size of memory.

Menu