Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

key bytes is bigger than redis memory used #74

Open
VGHAZ opened this issue Oct 26, 2016 · 4 comments
Open

key bytes is bigger than redis memory used #74

VGHAZ opened this issue Oct 26, 2016 · 4 comments

Comments

@VGHAZ
Copy link

VGHAZ commented Oct 26, 2016

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.

@oranagra
Copy link
Collaborator

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?

@VGHAZ
Copy link
Author

VGHAZ commented Oct 26, 2016

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?

default

@oranagra
Copy link
Collaborator

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..

@VGHAZ
Copy link
Author

VGHAZ commented Oct 31, 2016

Got it.

Thanks for replying, wait for your good news : ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants