Revision d583d23d86f43b0c6e474dce0e4a1ceba83abf07 authored by Mark Callaghan on 24 March 2022, 15:57:48 UTC, committed by Facebook GitHub Bot on 24 March 2022, 15:57:48 UTC
Summary:
When --benchmarks has more than one test then the threads in one benchmark
will use the same set of seeds as the threads in the previous benchmark.
This diff fixe that.

This fixes https://github.com/facebook/rocksdb/issues/9632

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

Test Plan:
For this command line the block cache is 8GB, so it caches at most 1024 8KB blocks. Note that without
this diff the second run of readrandom has a much better response time because seed reuse means the
second run reads the same 1000 blocks as the first run and they are cached at that point. But with
this diff that does not happen.

./db_bench --benchmarks=fillseq,flush,compact0,waitforcompaction,levelstats,readrandom,readrandom --compression_type=zlib --num=10000000 --reads=1000 --block_size=8192

...

```
Level Files Size(MB)
--------------------
  0        0        0
  1       11      238
  2        9      253
  3        0        0
  4        0        0
  5        0        0
  6        0        0
```

 --- perf results without this diff

DB path: [/tmp/rocksdbtest-2260/dbbench]
readrandom   :      46.212 micros/op 21618 ops/sec;    2.4 MB/s (1000 of 1000 found)

DB path: [/tmp/rocksdbtest-2260/dbbench]
readrandom   :      21.963 micros/op 45450 ops/sec;    5.0 MB/s (1000 of 1000 found)

 --- perf results with this diff

DB path: [/tmp/rocksdbtest-2260/dbbench]
readrandom   :      47.213 micros/op 21126 ops/sec;    2.3 MB/s (1000 of 1000 found)

DB path: [/tmp/rocksdbtest-2260/dbbench]
readrandom   :      42.880 micros/op 23299 ops/sec;    2.6 MB/s (1000 of 1000 found)

Reviewed By: jay-zhuang

Differential Revision: D35089763

Pulled By: mdcallag

fbshipit-source-id: 1b50143a07afe876b8c8e5fa50dd94a8ce57fc6b
1 parent 727d11c
History
File Mode Size
CMakeLists.txt -rw-r--r-- 485 bytes
batched_ops_stress.cc -rw-r--r-- 13.4 KB
cf_consistency_stress.cc -rw-r--r-- 19.3 KB
db_stress.cc -rw-r--r-- 763 bytes
db_stress_common.cc -rw-r--r-- 12.1 KB
db_stress_common.h -rw-r--r-- 20.8 KB
db_stress_compaction_filter.h -rw-r--r-- 2.9 KB
db_stress_driver.cc -rw-r--r-- 5.5 KB
db_stress_driver.h -rw-r--r-- 727 bytes
db_stress_env_wrapper.h -rw-r--r-- 1.7 KB
db_stress_gflags.cc -rw-r--r-- 39.1 KB
db_stress_listener.cc -rw-r--r-- 6.2 KB
db_stress_listener.h -rw-r--r-- 8.1 KB
db_stress_shared_state.cc -rw-r--r-- 1023 bytes
db_stress_shared_state.h -rw-r--r-- 13.0 KB
db_stress_stat.cc -rw-r--r-- 531 bytes
db_stress_stat.h -rw-r--r-- 6.4 KB
db_stress_table_properties_collector.h -rw-r--r-- 2.1 KB
db_stress_test_base.cc -rw-r--r-- 110.3 KB
db_stress_test_base.h -rw-r--r-- 9.6 KB
db_stress_tool.cc -rw-r--r-- 12.8 KB
expected_state.cc -rw-r--r-- 23.2 KB
expected_state.h -rw-r--r-- 9.9 KB
multi_ops_txns_stress.cc -rw-r--r-- 50.0 KB
multi_ops_txns_stress.h -rw-r--r-- 12.6 KB
no_batched_ops_stress.cc -rw-r--r-- 31.2 KB

back to top