You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by GitBox <gi...@apache.org> on 2022/09/14 06:27:59 UTC

[GitHub] [incubator-kvrocks] lrb1996 opened a new issue, #874: The requirement of two commands for Kvrocks

lrb1996 opened a new issue, #874:
URL: https://github.com/apache/incubator-kvrocks/issues/874

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-kvrocks/issues) and found no similar issues.
   
   
   ### Motivation
   
    I have a requirement which I hope you dear admins can develop it.  When we use Redis, we can easily get clear the memory usage of the specific key by using command "memory usage key " as well as the keyspace hits percentage of the specific key by using command "info".  **But for Kvrocks, we can't easily get the information by using commands.**  In conclusion, i'll appreciate it if you can solve this problem.  Looking forward to your reply, thank you!
   
   
   
   ### Solution
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] lrb1996 commented on issue #874: The requirement of two commands for Kvrocks

Posted by GitBox <gi...@apache.org>.
lrb1996 commented on issue #874:
URL: https://github.com/apache/incubator-kvrocks/issues/874#issuecomment-1246558361

   > 
   
   Thanks for your reply.  I know that Kvrocks stores its data in disk instead of the memory,  but i think it's also necessary to know the size of the specific key accurately, otherwize it may cause the problem of the high cpu percentage or some other related indexes of machine. I wonder if there's a fast way to know the size of the specific key  clearly like Redis.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #874: The requirement of two commands for Kvrocks

Posted by GitBox <gi...@apache.org>.
git-hulk commented on issue #874:
URL: https://github.com/apache/incubator-kvrocks/issues/874#issuecomment-1247042832

   @tanruixiang sure, thanks for your interest. We want a command like Redis [MEMORY USAGE](https://redis.io/commands/memory-usage/) except the usage should be disk space, and as you
   said we can use `GetApproximateSizes` to count the approximate size. So what we need to do is:
   
   1. implement a command like `DISK USAGE key` and [SAMPLES count] is no need.
   2. Count the value size directly if the key type is a string, or we need to use `GetApproximateSizes` to get the key size with a prefix. The prefix should be composed of key and version since we use the version to identify the live subkeys. I think you can have a look at [How Kvrocks Design Complex Structure On Rocksdb](https://kvrocks.apache.org/docs/Design/design-structure-on-rocksdb) and come back to discuss if you still don't know how to do that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #874: The requirement of two commands for Kvrocks

Posted by GitBox <gi...@apache.org>.
git-hulk commented on issue #874:
URL: https://github.com/apache/incubator-kvrocks/issues/874#issuecomment-1246537929

   Do you mean the disk space usage of key? Kvrocks stores its data in disk instead of the memory, so the memory usage of key is meaningless for Kvrocks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk commented on issue #874: The requirement of two commands for Kvrocks

Posted by GitBox <gi...@apache.org>.
git-hulk commented on issue #874:
URL: https://github.com/apache/incubator-kvrocks/issues/874#issuecomment-1246617890

   Thanks for your clarification. It makes sense to export the value size of the specific key, and it should be possible since the RocksDB has a way to get the approximate size with the prefix if my memory serves.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] tanruixiang commented on issue #874: The requirement of two commands for Kvrocks

Posted by GitBox <gi...@apache.org>.
tanruixiang commented on issue #874:
URL: https://github.com/apache/incubator-kvrocks/issues/874#issuecomment-1246959036

   > 
   
   
   
   > Thanks for your clarification. It makes sense to export the value size of the specific key, and it should be possible since the RocksDB has a way to get the approximate size with the prefix if my memory serves.
    
   @git-hulk  Hi. Maybe u mean `GetApproximateSizes`. I am willing to do this task. Can you give me some guidance?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-kvrocks] git-hulk closed issue #874: The requirement of two commands for Kvrocks

Posted by GitBox <gi...@apache.org>.
git-hulk closed issue #874: The requirement of two commands for Kvrocks 
URL: https://github.com/apache/incubator-kvrocks/issues/874


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org