Closed BaronStack closed 2 years ago
There is a dump tool which could help analyze the on-disk layout of your RocksDB instance. You may have a try and upload logs. Meanwhile, would you please take a look at RocksDB log, better to upload it? Is there any warning that caused such space amplification?
@BaronStack Could you give it a try with target_file_size_base with a value of 1GB (--target_file_size_base=1073741824) in dbbench arguments. typically default target_file_size_base will be 64MB, which can increase the space amp.
@aravind-wdc Thanks for your advice. The space is normal for now after change the targe_file_size/write_buffer_size.
# ./plugin/zenfs/util/zenfs df --zbd=nvme2n1
Free: 927065 MB
Used: 31093 MB
Reclaimable: 7975 MB
Space amplification: 25%
But it's hard to understand the problem that every zone's space just store a small file ,then the remaining_capacity has been set 0, but actually there is 90% space is free.
@BaronStack There are some optimisations happening around the allocation logic in future releases which should address this.
@aravind-wdc Is that the issue #36 doing try to optimize the allocation algorithm?
But it's hard to understand the problem that every zone's space just store a small file ,then the remaining_capacity has been set 0, but actually there is 90% space is free.
That is the hardware constraint of ZNS. For example, on a zone, we created 1GB of files, but deleted 0.9GB of them. We can not immediately reuse the freed 0.9GB of space, as we need to reset the whole zone before using it again. That's what remaining_capacity
means.
@BaronStack : #36 aims to reduce the allocation latency, providing better write quality of service.
I plan to explore alternative alternative allocation algorithms in the future (the one we are using right now seems good enough, but we could do perhaps do better). Ideas and testing are very welcome!
Adding optional garbage collection would also be interesting to try out(see #13) - for use cases that space utilization needs to be maximized.
@BaronStack : Can we close this issue now?
@BaronStack : Can we close this issue now?
Of course! Thanks for all of your reply!
TEST
DISK: ZNS * 2T Rocksdb: 6.25 Zenfs: master max_active_zones: 14 max_open_zones: 14 chunk_sectors: 4194304 chunk_sectors-size: 2M
Problem
Two much amplification after fillrandom and overwrite.
test_bench.sh
After finished:
We can see that there ara more than 770G space need reclaim, and actual space occupy is just 54G.
Any suggestion to solve the problem?