This has results for the Insert Benchmark using MyRocks 5.6 and 8.0, a medium server and an IO-bound workload with a working set that isn't cached.
tl;dr
- The cost from enabling the perf schema was insignificant for the write-heavy and point-query benchmark steps. It was significant for the range-query benchmark steps.
Comparing latest MyRocks 5.6.35 to older MyRocks 5.6.35
- Write-heavy perf mostly improves, especially on the initial load step (l.i0)
- Point-query perf is stable
- Range-query perf shows a big regression between the fbmy5635_rel_202210112144 and fbmy5635_rel_202302162102 builds
Comparing latest MyRocks 8.0.32 to older MyRocks 5.6.35
- The cost of the perf schema is large for range queries and otherwise not large
- Write-heavy perf mostly improves, especially on the initial load step (l.i0)
- Point-query perf is stable
- Range-query perf shows a big regression between the fbmy5635_rel_202210112144 and fbmy5635_rel_202302162102 builds and doesn't recover in the 8.0 builds
Comparing latest MyRocks 8.0.32 to latest MyRocks 5.6.35
- Write-heavy perf is similar except for the initial load step (l.i0) in which 8.0 is almost 20% slower
- Point-query perf is similar
- Range-query perf is ~5% worse in 8.0
Comparing latest MyRocks 8.0.32 to latest MyRocks 8.0.28
- Results are similar
Build + Configuration
See the previous report.
Benchmark
See the previous report.
Benchmark steps
The benchmark is run with 8 clients and a client per table.
The benchmark is a sequence of steps that are run in order:
- l.i0
- insert 500M rows per table in PK order. The table has a PK index but no secondary indexes. There is one connection per client.
- l.x
- create 3 secondary indexes per table. There is one connection per client.
- l.i1
- use 2 connections/client. One does inserts as fast as possible and the other does deletes at the same rate as the inserts to avoid changing the number of rows in the table. Each transaction modifies 50 rows (big transactions). This step is run for a fixed number of inserts, so the run time varies depending on the insert rate.
- l.i2
- like l.i1 but each transaction modifies 5 rows (small transactions).
- Wait for X seconds after the step finishes to reduce variance during the read-write benchmark steps that follow where X is max(1200, 60 + #nrows/1M). While waiting do things to reduce writeback debt where the things are:
- MyRocks (see here) - set rocksdb_force_flush_memtable_now to flush the memtable, wait 20 seconds and then set rocksdb_compact_lzero_now to flush L0. Note that rocksdb_compact_lzero_now wasn't supported until mid-2023.
- qr100
- use 3 connections/client. One does range queries as fast as possible and performance is reported for this. The second does does 100 inserts/s and the third does 100 deletes/s. The second and third are less busy than the first. The range queries use covering secondary indexes. This step is run for 1800 seconds. If the target insert rate is not sustained then that is considered to be an SLA failure. If the target insert rate is sustained then the step does the same number of inserts for all systems tested.
- qp100
- lik qr100 except uses point queries on the PK index
- qr500
- like qr100 but the insert and delete rates are increased from 100/s to 500/s
- qp500
- like qp100 but the insert and delete rates are increased from 100/s to 500/s
- qr1000
- like qr100 but the insert and delete rates are increased from 100/s to 1000/s
- qp1000
- like qp100 but the insert and delete rates are increased from 100/s to 1000/s
Results
The performance reports are here for
- MyRocks 5.6
- MyRocks 8.0
- MyRocks 5.6 & 8.0 with many 5.6 versions
- MyRocks 5.6 & 8.0 with the latest versions
The summary has 3 tables. The first shows absolute throughput by DBMS tested X benchmark step. The second has throughput relative to the version on the first row of the table. The third shows the background insert rate for benchmark steps with background inserts and all systems sustained the target rates. The second table makes it easy to see how performance changes over time.
Below I use relative QPS to explain how performance changes. It is: (QPS for $me / QPS for $base) where $me is my version and $base is the version of the base case. When relative QPS is > 1.0 then performance improved over time. When it is < 1.0 then there are regressions. The Q in relative QPS measures:
- insert/s for l.i0, l.i1, l.i2
- indexed rows/s for l.x
- range queries/s for qr100, qr500, qr1000
- point queries/s for qp100, qp500, qp1000
Below I use colors to highlight the relative QPS values with red for <= 0.95, green for >= 1.05 and grey for values between 0.95 and 1.05.
From the summary for 5.6
- The base case is fbmy5635_rel_202104072149
- Comparing throughput in fbmy5635_rel_221222 to the base case
- Write-heavy
- l.i0, l.x, l.i1, l.i2 - relative QPS is 1.11, 0.92, 1.00, 1.00
- Range queries
- qr100, qr500, qr1000 - relative QPS is 0.62, 0.79, 0.77
- Point queries
- qp100, qp500, qp1000 - relative QPS is 0.97, 1.00, 0.99
From the summary for 8.0
- The base case is fbmy8028_rel_221222
- The cost of the perf schema is <= 2% for write-heavy, <= 19% for range queries and <= 1% for point queries. I am not certain that the impact on range queries is all from the perf schema. I still need to explain why the range query benchmark steps have too much noise.
- Comparing throughput in fbmy8032_rel_221222 to the base case
- Write-heavy
- l.i0, l.x, l.i1, l.i2 - relative QPS is 0.96, 0.98, 0.99, 0.97
- Range queries
- qr100, qr500, qr1000 - relative QPS is 1.02, 1.04, 1.04
- Point queries
- qp100, qp500, qp1000 - relative QPS is 0.99, 1.00, 0.98
From the summary for 5.6, 8.0 with many versions
- The base case is fbmy5635_rel_202104072149
- Comparing throughput in fbmy8032_rel_221222 to the base case
- Write-heavy
- l.i0, l.x, l.i1, l.i2 - relative QPS is 0.91, 0.87, 0.99, 0.97
- Range queries
- qr100, qr500, qr1000 - relative QPS is 0.58, 0.76, 0.74
- Point queries
- qp100, qp500, qp1000 - relative QPS is 0.98, 1.03, 1.01
From the summary for 5.6, 8.0 with latest versions
- The base case is fbmy5635_rel_221222
- Comparing throughput in fbmy8032_rel_221222 to the base case
- Write-heavy
- l.i0, l.x, l.i1, l.i2 - relative QPS is 0.82, 0.95, 0.98, 0.97
- Range queries
- qr100, qr500, qr1000 - relative QPS is 0.95, 0.96, 0.96
- Point queries
- qp100, qp500, qp1000 - relative QPS is 1.01, 1.02, 1.02
No comments:
Post a Comment