I’m trying to generate SST files with a strict, fixed size under FIFO compaction. I’ve set write_buffer_size and target_file_size_base to 512 MB, but the resulting files still vary (roughly 505–518 MB).
Over time, when FIFO deletes old files, this size variation slowly leads to fragmentation.
Is there a way to force RocksDB to create SST files with an exact, fixed size, even if it means adding padding or garbage data inside the SST file?
rocksdb version : 10.4.0
cf options:
target_file_size_base = 512ULL * 1024 * 1024;
write_buffer_size = 512ULL * 1024 * 1024;
max_write_buffer_number = 4;
min_write_buffer_number_to_merge = 1;
compression = rocksdb::kNoCompression;
compaction_style = rocksdb::kCompactionStyleFIFO;
compaction_options_fifo.allow_compaction = false;
compaction_options_fifo.max_table_files_size = mDbCapacityMB * 1024 * 1024;