redis-rdb-tools
redis-rdb-tools copied to clipboard
key bytes is bigger than redis memory used
I use redis-memory-for-key to analyse a key and find the bytes of the key is 589M. But my redis memory used just only 502M. I wonder the meaning of bytes of a key.
Can you please share some details about your key? what type is it?, what encoding (OBJECT ENCODING key)?, number of fields or elements in the key, and if you know their sizes. what redis version are you using? version and architecture (32bit or 64bit)?
can you try modifying redis_memory_for_key.py and pass your correct redis version to the redis_version argument of MemoryCallback?
Thanks for replying.
it is a sorted set with 3801696 members. My redis version is 3.2.4.
I can't find where is the redis_memory_for_key.py. Can you tell me where to find it?
looks like you're already using the right version (by default it calculates memory usage of redis 3.2), so there's no need to edit that script. anyway, it looks like the memory estimations for sorted sets are inaccurate. they need to be improved, but i don't currently have time to handle that, so it may take time..
Got it.
Thanks for replying, wait for your good news : ).