* Insert warm blocks (data blocks, uncompressed dict blocks, index and filter blocks) in Block cache during flush under option BlockBasedTableOptions.prepopulate_block_cache. Previously it was enabled for only data blocks.
* BlockBasedTableOptions.prepopulate_block_cache can be dynamically configured using DB::SetOptions.
* Add CompactionOptionsFIFO.age_for_warm, which allows RocksDB to move old files to warm tier in FIFO compactions. Note that file temperature is still an experimental feature.
+* Add a comment to suggest btrfs user to disable file preallocation by setting `options.allow_fallocate=false`.
### Performance Improvements
* Try to avoid updating DBOptions if `SetDBOptions()` does not change any option value.
// Not supported in ROCKSDB_LITE mode!
bool use_direct_io_for_flush_and_compaction = false;
- // If false, fallocate() calls are bypassed
+ // If false, fallocate() calls are bypassed, which disables file
+ // preallocation. The file space preallocation is used to increase the file
+ // write/append performance. By default, RocksDB preallocates space for WAL,
+ // SST, Manifest files, the extra space is truncated when the file is written.
+ // Warning: if you're using btrfs, we would recommend setting
+ // `allow_fallocate=false` to disable preallocation. As on btrfs, the extra
+ // allocated space cannot be freed, which could be significant if you have
+ // lots of files. More details about this limitation:
+ // https://github.com/btrfs/btrfs-dev-docs/blob/471c5699336e043114d4bca02adcd57d9dab9c44/data-extent-reference-counts.md
bool allow_fallocate = true;
// Disable child process inherit open files. Default: true