Akanksha Mahajan
0c7f455f85
Make initial auto readahead_size configurable (#9836)
Summary:
Make initial auto readahead_size configurable
Pull Request resolved: https://github.com/facebook/rocksdb/pull/9836
Test Plan:
Added new unit test
Ran regression:
Without change:
```
./db_bench -use_existing_db=true -db=/tmp/prefix_scan_prefetch_main -benchmarks="seekrandom" -key_size=32 -value_size=512 -num=5000000 -use_direct_reads=true -seek_nexts=327680 -duration=120 -ops_between_duration_checks=1
Initializing RocksDB Options from the specified file
Initializing RocksDB Options from command-line flags
RocksDB: version 7.0
Date: Thu Mar 17 13:11:34 2022
CPU: 24 * Intel Core Processor (Broadwell)
CPUCache: 16384 KB
Keys: 32 bytes each (+ 0 bytes user-defined timestamp)
Values: 512 bytes each (256 bytes after compression)
Entries: 5000000
Prefix: 0 bytes
Keys per prefix: 0
RawSize: 2594.0 MB (estimated)
FileSize: 1373.3 MB (estimated)
Write rate: 0 bytes/second
Read rate: 0 ops/second
Compression: Snappy
Compression sampling rate: 0
Memtablerep: SkipListFactory
Perf Level: 1
------------------------------------------------
DB path: [/tmp/prefix_scan_prefetch_main]
seekrandom : 483618.390 micros/op 2 ops/sec; 338.9 MB/s (249 of 249 found)
```
With this change:
```
./db_bench -use_existing_db=true -db=/tmp/prefix_scan_prefetch_main -benchmarks="seekrandom" -key_size=32 -value_size=512 -num=5000000 -use_direct_reads=true -seek_nexts=327680 -duration=120 -ops_between_duration_checks=1
Set seed to 1649895440554504 because --seed was 0
Initializing RocksDB Options from the specified file
Initializing RocksDB Options from command-line flags
RocksDB: version 7.2
Date: Wed Apr 13 17:17:20 2022
CPU: 24 * Intel Core Processor (Broadwell)
CPUCache: 16384 KB
Keys: 32 bytes each (+ 0 bytes user-defined timestamp)
Values: 512 bytes each (256 bytes after compression)
Entries: 5000000
Prefix: 0 bytes
Keys per prefix: 0
RawSize: 2594.0 MB (estimated)
FileSize: 1373.3 MB (estimated)
Write rate: 0 bytes/second
Read rate: 0 ops/second
Compression: Snappy
Compression sampling rate: 0
Memtablerep: SkipListFactory
Perf Level: 1
------------------------------------------------
DB path: [/tmp/prefix_scan_prefetch_main]
... finished 100 ops
seekrandom : 476892.488 micros/op 2 ops/sec; 344.6 MB/s (252 of 252 found)
```
Reviewed By: anand1976
Differential Revision: D35632815
Pulled By: akankshamahajan15
fbshipit-source-id: c8057a88f9294c9d03b1d434b03affe02f74d796
2022-04-15 17:28:09 -07:00
..
2022-03-07 18:06:19 -08:00
2022-03-07 18:06:19 -08:00
2021-08-19 10:10:47 -07:00
2021-11-30 13:23:25 -08:00
2021-04-26 03:13:24 -07:00
2021-12-09 12:36:18 -08:00
2022-04-11 13:28:33 -07:00
2021-09-10 05:21:04 -07:00
2022-03-30 14:51:12 -07:00
2022-02-08 19:31:28 -08:00
2022-03-18 11:06:17 -07:00
2022-03-18 11:06:17 -07:00
2021-10-19 10:43:04 -07:00
2020-09-14 17:01:01 -07:00
2022-04-15 17:28:09 -07:00
2022-04-06 10:33:00 -07:00
2022-03-21 07:12:43 -07:00