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
..
2021-12-10 08:13:26 -08:00
2022-04-15 17:28:09 -07:00
2022-02-16 23:18:14 -08:00
2022-04-13 07:34:01 -07:00
2021-12-17 04:20:47 -08:00
2022-04-04 15:35:43 -07:00
2021-12-10 08:13:26 -08:00
2020-02-20 12:09:57 -08:00
2022-02-16 23:18:14 -08:00
2021-12-13 17:43:07 -08:00
2021-11-19 17:53:47 -08:00
2021-09-29 04:04:40 -07:00
2021-11-10 16:20:04 -08:00
2020-02-20 12:09:57 -08:00
2021-11-10 16:20:04 -08:00
2020-02-20 12:09:57 -08:00
2021-10-06 07:48:31 -07:00
2021-10-14 12:01:56 -07:00
2021-09-29 04:04:40 -07:00
2022-04-06 15:54:40 -07:00
2022-04-06 15:54:40 -07:00
2022-02-16 23:18:14 -08:00
2021-08-19 10:10:47 -07:00
2022-01-27 14:55:04 -08:00
2021-12-16 17:15:13 -08:00
2020-02-20 12:09:57 -08:00
2021-12-16 17:15:13 -08:00
2020-02-20 12:09:57 -08:00
2022-03-18 11:06:17 -07:00
2022-03-18 11:06:17 -07:00
2022-02-08 12:15:35 -08:00
2022-01-21 11:37:46 -08:00
2021-09-29 04:04:40 -07:00
2022-03-07 18:06:19 -08:00
2022-01-21 11:37:46 -08:00
2022-01-11 06:33:48 -08:00
2021-11-18 11:43:44 -08:00
2022-04-07 12:25:43 -07:00
2022-01-21 11:37:46 -08:00
2021-09-10 10:00:26 -07:00
2020-08-03 15:23:04 -07:00
2022-03-01 13:58:02 -08:00
2021-10-27 17:23:04 -07:00
2020-02-20 12:09:57 -08:00
2021-10-18 23:32:01 -07:00
2021-10-18 23:32:01 -07:00