rocksdb icon indicating copy to clipboard operation
rocksdb copied to clipboard

Multireadrandom in benchmark.sh doesn't use batched MultiGet

Open pdillinger opened this issue 2 years ago • 5 comments

https://github.com/facebook/rocksdb/blob/3653029dda238692564773552c55cc29fea10310/tools/db_bench_tool.cc#L1548 https://github.com/facebook/rocksdb/blob/3653029dda238692564773552c55cc29fea10310/tools/benchmark.sh#L521 https://github.com/facebook/rocksdb/blob/3653029dda238692564773552c55cc29fea10310/include/rocksdb/db.h#L586 https://github.com/facebook/rocksdb/wiki/Performance-Benchmarks#test-3-multi-random-read-benchmarksh-multireadrandom

Fortunately, regression_test.sh does use batched MultiGet: https://github.com/facebook/rocksdb/blob/3653029dda238692564773552c55cc29fea10310/tools/regression_test.sh#L249

pdillinger avatar Apr 26 '22 18:04 pdillinger

Doing a MultiGet benchmark with db_bench is user-hostile, because defaults for --multiread_batched and --batch_size work against you.

pdillinger avatar Apr 26 '22 18:04 pdillinger

Not sure if you wanted this up-for-grabs or assigned to yourself. Please correct it if my guess was incorrect.

ajkr avatar Apr 26 '22 21:04 ajkr

@ajkr I have fixed it and sent out the PR

lhsoft avatar Jul 08 '22 10:07 lhsoft

@pdillinger you can use benchmark.sh multireadrandom --multiread_batched=true to use the new MultiGet API. I also added env parameterMULTIREAD_BATCHED for regression.sh to enable or disable the multiread_batched

lhsoft avatar Jul 19 '22 02:07 lhsoft

@ajkr I added new env parameter MULTIREAD_BATCHED for regression.sh which will have the same behavior as benchmark.sh

lhsoft avatar Jul 25 '22 15:07 lhsoft