# Test environment:
* Fedora 38
* Linux kernel 6.3.7
* AMD Ryzen 9 5900x
* 48 Gib RAM
* SSD Samsung 980 Pro 2 Tib
* Clang 16 (from the Fedora repositories). I use Clang just because I prefer LLVM-based tooling
* RocksDB version: main branch (commit 15053f3ab47839bc14dc31a8a62df1d23f6babbe)
# Benchmark
As a simple benchmark, I use db_bench (via benchmark.sh) with the following command: `DB_DIR=db_dir WAL_DIR=wal_dir OUTPUT_DIR=output_dir DB_BENCH_NO_SYNC=1 COMPRESSION_TYPE=none NUM_THREADS=24 DURATION=300 benchmark.sh readrandom`.
I use this command as a training and benchmark tool.
RocksDB built with `CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -G Ninja ../rocksdb`. As a PGO technique, I use `-fprofile-instr-generate`/`-fprofile-instr-use` Instrumentation mode from Clang.
# Results
Here are results for usual "Release" build and "Release with PGO". In "Release with PGO" results shown for PGOed librocks.so and non-PGOed db_bench tool (so we can measure improvements only on RocksDB side). Format of the reports - a part of the "benchmark.sh" output. I performed the measurements multiple times, on the same machine, with the same hardware, etc - the results are consistent on my machine.
Release:
DB path: [db_dir]
readrandom : 0.447 micros/op 53642638 ops/sec 300.001 seconds 16092868976 operations; (0 of 667309999 found)
Release + PGO:
DB path: [db_dir]
readrandom : 0.431 micros/op 55658391 ops/sec 300.004 seconds 16697714976 operations; (0 of 699368999 found)
I hope these results will be useful for someone. If you can suggest me a more robust benchmark (like ClickBench) - it would be awesome to test PGO effects on it too.