dosubot[bot] commented on issue #2689: URL: https://github.com/apache/incubator-hugegraph/issues/2689#issuecomment-2456048860
<!-- Answer --> I found a similar issue that was previously discussed and closed. The issue was about RocksDB's memory occupation being out of control. The suggested solution included replacing the default `ptmalloc` with `jemalloc` to manage memory usage more effectively. This involves downloading and compiling jemalloc, then modifying the server's startup script to preload the jemalloc shared object file <sup>[[1]](https://github.com/apache/incubator-hugegraph/issues/2204)</sup>. For optimizing RocksDB configuration to reduce the metadata footprint and save disk space, consider the following adjustments: 1. **Compression**: Use a more aggressive compression algorithm like `zstd` for both the general and bottommost levels to reduce data size on disk. 2. **Manifest File Size**: Reduce the maximum size of the manifest file to limit its disk usage. 3. **Memtable Size**: Adjust the memtable size to control memory usage and potentially reduce disk writes. 4. **Number of Levels**: Reduce the number of levels if the data size is small, which can help in reducing metadata. 5. **Direct Reads and Writes**: Enable direct reads and writes to potentially reduce overhead. 6. **Optimize Compaction**: Use optimized compaction settings to manage space more efficiently <sup>[[2]](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-server/hugegraph-rocksdb/src/main/java/org/apache/hugegraph/backend/store/rocksdb/RocksDBOptions.java)</sup>. These changes should help in reducing the metadata footprint and saving disk space when using RocksDB with HugeGraph. Adjust these settings based on your specific use case and test the impact on performance and disk usage. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
