-
Notifications
You must be signed in to change notification settings - Fork 583
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
[BUG] KeyDB never releases space from the Flash Storage #870
Comments
Hi @epaolillo Under the hood, KeyDB uses rocksdb, and I believe space will be freed when rocksdb does a compaction. As to when compaction is triggered, you might want to refer to their documentation. On a side note, I have been stress testing KeyDB with extensive read and writes (running for months 24/7), and I can confirm with "du -sh " the space used is close to the dump.rdb (output of bgsave).
However, this does not prove that there isn't a problem, as the space used by flash is more than the rdb. |
Thank you for the response. I had running keyDB during a month, and every key stored in the SST files are never compacted. Some aditional data that I can provide just ask me please, would great if I can contribute in some way |
Oh do you mean you did this:
And the 2nd get above returns a result? If not, can you describe how to reach the KEY and how did you remove it manually? |
No, its no there. BUT if I scan manually the SST files, I can found the key there. Its very strange. I will attach here the test This is a: cat 072636.log | grep -a TEST
Thanks! |
which version of KeyDB are you using? I am running KeyDB creating and deleting 500 - 1000 keys per second, 24/7 and have not seen this behaviour. The only bug I found related to rocksdb is here: But I doubt that would be the cause of your issue. In my flash folder, I only have non empty log files for the current day, all older log files have the pattern and have 0 size:
It could be an something strange going on in your environment. |
keydb-server --version Im not sure how I have that cpp file given that I installed keydb using apt. How I can check it? Server Clients Memory Persistence Stats Replication CPU Modules Cluster Keyspace KeyDB |
Interesting, you have 2.8M keys and flash storage is 208GB... Maybe the logs might give some clues...? |
Describe the bug
KeyDB never releases space from the Flash storage. Despite manually deleting keys, the amount of used storage does not significantly decrease.
To reproduce
Expected behavior
After deleting keys, the amount of storage space used by KeyDB should decrease significantly, reflecting the removal of the data.
Additional information
The storage engine is configured to use Flash.
I’ve ensured that the keys were deleted correctly and are no longer accessible.
However, the storage space used does not change, even after multiple manual deletions.
Version of KeyDB being used: 6.3.4
OS: Ubuntu 20.04
The text was updated successfully, but these errors were encountered: