badger
badger copied to clipboard
Why v3 doesn't have FileIO mode
Question.
Version: v3
System: centos7
Go Version: go1.18 linux/amd64
In our scenario, we need to traverse the entire database, but the memory usage is too much. We want to reduce the memory usage by configuring parameters, but modifying the parameters does not reduce the memory usage too much. I modified the read method (not using mmap) to save nearly 50% memory.
Why doesn’t v3 use FileIO mode?
Using mmap is indeed much faster, but you can use memory cache to improve the efficiency of hits, because our scene’s hot data accounts for the majority, using FileIO mode and 20% memory cache can also save 30% compared to before of memory.
Using v2 to traverse the entire database memory usage is also very large, even if the FileIO mode is used
This seems related to https://github.com/dgraph-io/badger/issues/1841 and we plan to look into this next month.
Thank you very much!
I want to know if there is any plan for v3 to support FileIO mode.
This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.