This has results for sysbench vs upstream MySQL on a small server. I have results for some 5.6, 5.7 and 8.0 releases up to 8.0.36. My last report stopped at 8.0.34. The goal is to document where things get faster or slower over time for a low-concurrency and CPU-bound workload. The focus is on CPU regressions.
My results here aren't universal.
- The microbenchmarks here mostly measure CPU overheads
- Things won't look the same with an IO-bound workload. If nothing else that will make many of the CPU regressions less significant.
- Things won't look the same with a workload that has more concurrency. While MySQL tends to get slower over time from more CPU overhead it also gets faster over time on concurrent workloads from improvements to synchronization code. Results from a few months ago on a larger server are here and the regressions are much smaller.
- Things won't look the same with a workload that has complex queries. Most of the queries used by sysbench are simple and short running. This amplifies the impact of perf regressions in parse, semantic analysis and query optimization.
tl;dr
- Upstream MySQL would benefit from changepoint detection as provided by Nyrkiƶ.
- MySQL 8.0 is the worst for perf regressions, while 5.7 and 5.6 are better at avoiding them. Also, there tend to be large regressions between the last point release in one major version and the first point release in the following major version, for instance from 5.6.51 to 5.7.10.
- The scan_range=100 microbenchmark that does a full table scan has a large regression from 8.0.28 to 8.0.36 and bug 111538 is open for this
- For point queries, 8.0.36 gets 19% to 39% less QPS than 5.6.21
- For range queries that don't do aggregation (part 1), 8.0.36 gets 29% to 39% less QPS than 5.6.21
- For range queries that do aggregation, 8.0.36 gets 3% to 45% less QPS than 5.6.21. The difference depends on the length of the range scan, where shorter scan == larger regression.
- Full scan (scan_range=100) has the largest regression (5.6.21 is ~2X faster than 8.0.36)
- For most writes (ignoring the update-index microbenchmark), 8.0.36 gets about half of the throughput compared to 5.6.21
- 5.6 - 5.6.21, 5.6.31, 5.6.41, 5.6.51
- 5.7 - 5.7.10, 5.7.20, 5.7.30, 5.7.44
- 8.0 - 8.0.13, 8.0.14, 8.0.20, 8.0.28, 8.0.35, 8.0.36
I used sysbench and my usage is explained here. There are 42 microbenchmarks and each tests ~1 type of SQL statement and is run for 1200 seconds.
The benchmark is run with:
- one connection
- 30M rows and a database cached by InnoDB
- each microbenchmark runs for 1200 seconds
- prepared statements were enabled
All of the charts have relative throughput on the y-axis where that is (QPS for $me) / (QPS for $base), $me is a version (for example 5.7.20) and $base is the base version. The base version is specified below and one of 5.6.21, 5.7.10 and 8.0.13 depending on what I am comparing. The y-axis doesn't start at 0 to improve readability.
From 5.6.21 to 8.0.36
This section uses 5.6.21 as the base version and then compares that with 5.6.51, 5.7.10, 5.7.44, 8.0.13, 8.0.14, 8.0.20, 8.0.28, 8.0.35 and 8.0.36 to show how performance has changed from oldest tested (5.6.21) to newest tested (8.0.36).
- The largest regressions might occur between the last point release in one major version and the first point release in the next major version.
- For point queries, 8.0.36 gets 19% to 39% less QPS vs 5.6.21
- For range queries that don't do aggregation (part 1), 8.0.36 gets 29% to 39% less QPS vs 5.6.21
- For range queries that do aggregation, 8.0.36 gets 3% to 45% less QPS vs 5.6.21. The difference depends on the length of the range scan -- shorter scan == larger regression. And full scan (scan_range=100) has the largest regression.
- For most writes (ignoring the update-index microbenchmark), 8.0.36 gets about half of the throughput compared to 5.6.21
- Point queries are ~5% slower in 8.0.36
- Range queries without aggregation are between 6% and 15% slower in 8.0.36 and for a few microbenchmarks there is a big regression after 8.0.28 (possibly bug 111538)
- Range queries with aggregation are mostly ~15% slower in 8.0.36
- Full scan is ~32% slower in 8.0.36 with a big regression after 8.0.28 (possibly bug 111538)
- Writes are ~20% slower in 8.0.36 with a big regression after 8.0.20
No comments:
Post a Comment