-
Notifications
You must be signed in to change notification settings - Fork 825
[NEW]Info Keysizes section #1969
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
Comments
@hwware, with the upcoming atomic slot migration and slot level metrics (cpu/memory/network), the operator can do their work without having key-level metrics anymore IMO. this seems to be more geared towards developers as oppose to operators? can you talk about the developer use cases a bit? |
Info keysize show the distribution range of keysizes. I think it can be used to confirm whether the current valkey has large key. |
Do you point this issue #852. I think slot level metrics can not align with the key level issue due to the following reasons:
|
This #1803 is much closer to the info keysizes feature, but it provides another prospective to admin |
Discussed during the core team meeting:
|
Uh oh!
There was an error while loading. Please reload this page.
The problem/use-case that the feature addresses
In Valkey, for any key, we have 2 different concepts to identify it: bigkey or memkey (aka large key). (You can check the valkey-cli options https://valkey.io/topics/cli/)
bigkey: it represents how many elements with this key, includes List, Set, Hash, and Sorted Set, or how long with the String datatype.
memkeys (large key): it represents the number of bytes that a key and its value require to be stored in RAM.
For example:
bigkey for mylist: (it returns 5)
memkey for mylist: (it returns 57 in Valkey 8.1 version)
Now in Valkey, we do not directly calculate the total memory consumption for all the keys in memory in real time, we use a
reverse calculation way: used_memory - overhead_memory. Because it is too expensive to calculate the memory usage of every key directly. So it is same, implementing memkey(large keys) in real time is challenging, thus someone use the big keys as an alternative as an approximate method to achieve the large key goal.
Description of the feature
Reference Redis latest feature in Version 8 as below:
The POC PR is here: #1967
I already implement part of this feature for several commands, such as LPUSH, HSET etc.
Ref: We have another feature for BigKeyLog #1827
Alternatives you've considered
Any alternative solutions or features you've considered, including references to existing open and closed feature requests in this repository.
Additional information
Any additional information that is relevant to the feature request.
The text was updated successfully, but these errors were encountered: