Stanislaw Makarawec
09/26/2025, 7:54 AMRunLLM
09/26/2025, 7:54 AMStanislaw Makarawec
09/26/2025, 8:02 AMRunLLM
09/26/2025, 8:02 AMlocations directory can accumulate, especially after upgrades or under high throughput, and are not always cleared by retention or TTL settings. This is a known issue and is often related to RocksDB compaction not being aggressive enough or not triggered as expected. Tuning RocksDB compaction parameters for the location index may help, but the exact settings depend on your workload and BookKeeper version. See discussion and suggestions in this issue.
Would you like more detail on how to tune RocksDB compaction or identify which SST files can be safely deleted?
Sources:
- BookKeeper issue: Large number of SST files in locations not being cleared after upgrade 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.Stanislaw Makarawec
09/26/2025, 8:19 AMRunLLM
09/26/2025, 8:19 AMlocations directory, you should tune RocksDB compaction for the entry location index. BookKeeper now supports using a dedicated entry_location_rocksdb.conf file for this purpose. You can increase compaction aggressiveness by adjusting parameters like level_compaction_dynamic_level_bytes, write_buffer_size, max_background_jobs, and triggering manual compaction if needed. Also, ensure that deleteRange operations are followed by a compactRange to clean up SSTs, as background compaction may skip files with only tombstones. See BookKeeper PR #4555 and BookKeeper RocksDB config docs.
To manually trigger compaction, you can use the BookKeeper shell or REST API, or adjust the compaction interval to run more frequently. If you are on a recent version, check that the entryLocationCompactionInterval is set appropriately and not disabled. For more, see BookKeeper PR #4555 and RocksDB config settings.
Sources:
- BookKeeper PR #4555
- BookKeeper RocksDB config docs 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.Lari Hotari
09/26/2025, 9:29 AMLari Hotari
09/26/2025, 9:31 AMcurl -X PUT localhost:8000/api/v1/bookie/entry_location_compact -d '{"entryLocationRocksDBCompact":true}'Stanislaw Makarawec
09/26/2025, 11:11 AMLari Hotari
09/26/2025, 12:23 PMLari Hotari
09/26/2025, 12:23 PMStanislaw Makarawec
09/26/2025, 12:53 PM