I previously shared benchmark results for RocksDB using the larger server that I have. In this post I share more results from two other large servers and one small server. This is arbitrary but I mean >= 20 cores for large, 10 to 19 cores for medium and less than 10 cores for small.
tl;dr
- There are several big improvements
- There might be small regression in fillseq performance, I will revisit this
- For the block cache hyperclock does much better than LRU on CPU-bound tests
- I am curious about issue 13546 but not sure the builds I tested include it
Software
I used RocksDB versions 6.29.5, 7.10.2, 8.11.4, 9.0.1, 9.1.2, 9.2.2, 9.3.2, 9.4.1, 9.5.2, 9.6.2, 9.7.4, 9.8.4, 9.9.3, 9.10.0, 9.11.2, 10.0.1, 10.1.3 and 10.2.1. Everything was compiled with gcc 11.4.0.
For 8.x, 9.x and 10.x the benchmark was repeated using both the LRU block cache (older code) and hyperclock (newer code). That was done by setting the --cache_type argument:
- lru_cache was used for versions 7.6 and earlier
- hyper_clock_cache was used for versions 7.7 through 8.5
- auto_hyper_clock_cache was used for versions 8.5+
Hardware
My servers are described here. From that list I used:
- The small server is a Ryzen 7 (AMD) CPU with 8 cores and 32G of RAM. It is v5 in the blog post.
- The first large server has 24 cores with 64G of RAM. It is v6 in the blog post.
- The other large server has 32 cores and 128G of RAM. It is v7 in the blog post.
Benchmark
Overviews on how I use db_bench are here and here.
Tests were run for a workload with the database cached by RocksDB that I call byrx in my scripts.
- fillseq
- load RocksDB in key order with 1 thread
- revrangeww, fwdrangeww
- do reverse or forward range queries with a rate-limited writer. Report performance for the range queries
- readww
- do point queries with a rate-limited writer. Report performance for the point queries.
- overwrite
- overwrite (via Put) random keys using many threads
Relative QPS
Many of the tables below (inlined and via URL) show the relative QPS which is:
(QPS for my version / QPS for base version)
The base version varies and is listed below. When the relative QPS is > 1.0 then my version is faster than the base version. When it is < 1.0 then there might be a performance regression or there might just be noise
Small server
The benchmark was run using 1 client thread and 20M KV pairs. Each benchmark step was run for 1800 seconds. Performance summaries are here.
For the byrx (cached database) workload with the LRU block cache:
- see relative and absolute performance summaries, the base version is RocksDB 6.29.5
- fillseq is ~14% faster in 10.2 vs 6.29 with improvements in 7.x and 9.x
- revrangeww and fwdrangeww are ~6% slower in 10.2 vs 6.29, I might revisit this
- readww has similar perf from 6.29 through 10.2
- overwrite is ~14% faster in10.2 vs 6.29 with most of the improvement in 7.x
For the byrx (cached database) workload with the Hyper Clock block cache
- see relative and absolute performance summaries, the base version is RocksDB 8.11.4
- there might be small regression (~3%) or there might be noise in the results
Large server (24 cores)
The benchmark was run using 16 client threads and 40M KV pairs. Each benchmark step was run for 1800 seconds. Performance summaries are here.
For the byrx (cached database) workload with the LRU block cache
- see relative and absolute performance summaries, the base version is RocksDB 6.29.5
- fillseq might have a new regression of ~4% in 10.2.1 or that might be noise, I will revisit this
- revrangeww, fwdrangeww, readww and overwrite are mostly unchanged since 8.x
For the byrx (cached database) workload with the Hyper Clock block cache
- see relative and absolute performance summaries, the base version is RocksDB 8.11.4
- fillseq might have a new regression of ~8% in 10.2.1 or that might be noise, I will revisit this
- revrangeww, fwdrangeww, readww and overwrite are mostly unchanged since 8.x
Large server (32 cores)
The benchmark was run using 24 client threads and 50M KV pairs. Each benchmark step was run for 1800 seconds. Performance summaries are here.
For the byrx (cached database) workload with the LRU block cache
- see relative and absolute performance summaries, the base version is RocksDB 6.29.5
- fillseq might have a new regression of ~10% from 7.10 through 10.2, I will revisit this
- revrangeww, fwdrangeww, readww and overwrite are mostly unchanged since 8.x
For the byrx (cached database) workload with the Hyper Clock block cache
- see relative and absolute performance summaries, the base version is RocksDB 7.10.2
- fillseq might have a new regression of ~10% from 7.10 through 10.2, I will revisit this
- revrangeww, fwdrangeww, readww and overwrite are mostly unchanged since 8.x