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.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c29889-33998.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c29889-33998.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?