Change MultiGet multi-level optimization to default on (#10671)

Summary:
Change the ```ReadOptions.optimize_multiget_for_io``` flag to default on. It doesn't impact regular MultiGet users as its only applicable when ```ReadOptions.async_io``` is also set to true.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/10671

Reviewed By: akankshamahajan15

Differential Revision: D39477439

Pulled By: anand1976

fbshipit-source-id: 47abcdbfa69f9bc60422ab68a238b232e085d4ba
main
anand76 2 years ago committed by Facebook GitHub Bot
parent 06ab0a8b40
commit 7b11d48444
  1. 1
      HISTORY.md
  2. 2
      include/rocksdb/options.h
  3. 4
      options/options.cc

@ -25,6 +25,7 @@
* When a block is firstly evicted from the primary cache to `CompressedSecondaryCache`, we just insert a dummy block in `CompressedSecondaryCache`. Only if it is evicted again before the dummy block is evicted from the cache, it is treated as a hot block and is inserted into `CompressedSecondaryCache`. * When a block is firstly evicted from the primary cache to `CompressedSecondaryCache`, we just insert a dummy block in `CompressedSecondaryCache`. Only if it is evicted again before the dummy block is evicted from the cache, it is treated as a hot block and is inserted into `CompressedSecondaryCache`.
* Improved the estimation of memory used by cached blobs by taking into account the size of the object owning the blob value and also the allocator overhead if `malloc_usable_size` is available (see #10583). * Improved the estimation of memory used by cached blobs by taking into account the size of the object owning the blob value and also the allocator overhead if `malloc_usable_size` is available (see #10583).
* Blob values now have their own category in the cache occupancy statistics, as opposed to being lumped into the "Misc" bucket (see #10601). * Blob values now have their own category in the cache occupancy statistics, as opposed to being lumped into the "Misc" bucket (see #10601).
* Change the optimize_multiget_for_io experimental ReadOptions flag to default on.
### New Features ### New Features
* RocksDB does internal auto prefetching if it notices 2 sequential reads if readahead_size is not specified. New option `num_file_reads_for_auto_readahead` is added in BlockBasedTableOptions which indicates after how many sequential reads internal auto prefetching should be start (default is 2). * RocksDB does internal auto prefetching if it notices 2 sequential reads if readahead_size is not specified. New option `num_file_reads_for_auto_readahead` is added in BlockBasedTableOptions which indicates after how many sequential reads internal auto prefetching should be start (default is 2).

@ -1697,7 +1697,7 @@ struct ReadOptions {
// parallel if the keys in the MultiGet batch are in different levels. It // parallel if the keys in the MultiGet batch are in different levels. It
// comes at the expense of slightly higher CPU overhead. // comes at the expense of slightly higher CPU overhead.
// //
// Default: false // Default: true
bool optimize_multiget_for_io; bool optimize_multiget_for_io;
ReadOptions(); ReadOptions();

@ -697,7 +697,7 @@ ReadOptions::ReadOptions()
value_size_soft_limit(std::numeric_limits<uint64_t>::max()), value_size_soft_limit(std::numeric_limits<uint64_t>::max()),
adaptive_readahead(false), adaptive_readahead(false),
async_io(false), async_io(false),
optimize_multiget_for_io(false) {} optimize_multiget_for_io(true) {}
ReadOptions::ReadOptions(bool cksum, bool cache) ReadOptions::ReadOptions(bool cksum, bool cache)
: snapshot(nullptr), : snapshot(nullptr),
@ -723,6 +723,6 @@ ReadOptions::ReadOptions(bool cksum, bool cache)
value_size_soft_limit(std::numeric_limits<uint64_t>::max()), value_size_soft_limit(std::numeric_limits<uint64_t>::max()),
adaptive_readahead(false), adaptive_readahead(false),
async_io(false), async_io(false),
optimize_multiget_for_io(false) {} optimize_multiget_for_io(true) {}
} // namespace ROCKSDB_NAMESPACE } // namespace ROCKSDB_NAMESPACE

Loading…
Cancel
Save