This has results for the sysbench benchmark on a small and big server for MySQL versions 5.6 through 9.5. The good news is that the arrival rate of performance regressions has mostly stopped as of 8.0.43. The bad news is that there were large regressions from 5.6 through 8.0.
tl;dr for low-concurrency tests
- for point queries
- MySQL 5.7.44 gets about 10% less QPS than 5.6.51
- MySQL 8.0 through 9.5 get about 30% less QPS than 5.6.51
- for range queries without aggregation
- MySQL 5.7.44 gets about 15% less QPS than 5.6.51
- MySQL 8.0 through 9.5 get about 30% less QPS than 5.6.51
- for range queries with aggregation
- MySQL 5.7.44 is faster than 5.6.51 for two tests, as fast for one and gets about 15% less QPS for the other five
- MySQL 8.0 to 9.5 are faster than 5.6.51 for one test, as fast for one and get about 30% less QPS for the other six
- for writes
- MySQL 5.7.44 gets between 10% and 20% less QPS than 5.6.51 for most tests
- MySQL 8.0 to 9.5 get between 40% to 50% less QPS than 5.6.51 for most tests
- for point queries
- for most tests MySQL 5.7 to 9.5 get at least 1.5X more QPS than 5.6.51
- for tests that use secondary indexes MySQL 5.7 to 9.5 get about 25% less QPS than 5.6.51
- for range queries without aggregation
- MySQL 5.7.44 gets about 10% less QPS than 5.6.51
- MySQL 8.0 through 9.5 get about 30% less QPS than 5.6.51
- for range queries with aggregation
- MySQL 5.7.44 is faster than 5.6.51 for six tests, as fast for one test and gets about 20% less QPS for one test
- MySQL 8.0 to 9.5 are a lot faster than 5.6.51 for two tests, about as fast for three tests and gets between 10% and 30% less QPS for the other three tests
- for writes
- MySQL 5.7.44 gets more QPS than 5.6.51 for all tests
- MySQL 8.0 to 9.5 get more QPS than 5.6.51 for all tests
- small
- an ASUS ExpertCenter PN53 with AMD Ryzen 7735HS CPU, 32G of RAM, 8 cores with AMD SMT disabled, Ubuntu 24.04 and an NVMe device with ext4 and discard enabled.
- big
- an ax162s from Hetzner with an AMD EPYC 9454P 48-Core Processor with SMT disabled
- 2 Intel D7-P5520 NVMe storage devices with RAID 1 (3.8T each) using ext4
- 128G RAM
- Ubuntu 22.04 running the non-HWE kernel (5.5.0-118-generic)
The read-heavy microbenchmarks are run for 600 seconds and the write-heavy for 900 seconds. On the small server the benchmark is run with 1 client and 1 table with 50M rows. On the big server the benchmark is run with 40 clients and 8 tables with 10M rows per table.
I provide charts below with relative QPS. The relative QPS is the following:
(QPS for some version) / (QPS for MySQL 5.6.51)
- MySQL 5.7.44 gets about 10% less QPS than 5.6.51
- MySQL 8.0 through 9.5 get about 30% less QPS than 5.6.51
- There are few regressions after MySQL 8.0
- New CPU overheads explain the regressions. See the vmstat results for the hot-points test.
- For most point query tests MySQL 5.7 to 9.5 get at least 1.5X more QPS than 5.6.51
- MySQL 5.7 to 9.5 use less CPU, see vmstat results for the hot-points test.
- For tests that use secondary indexes (*-si) MySQL 5.7 to 9.5 get about 25% less QPS than 5.6.51.
- This result is similar to what happens on the small server above.
- The regressions are from extra CPU overhead, see vmstat results
- MySQL 5.7 does better than 8.0 to 9.5. There are few regressions after MySQL 8.0.
- MySQL 5.7.44 gets about 15% less QPS than 5.6.51
- MySQL 8.0 through 9.5 get about 30% less QPS than 5.6.51
- There are few regressions after MySQL 8.0
- New CPU overheads explain the regressions. See the vmstat results for the scan test.
- MySQL 5.7.44 gets about 10% less QPS than 5.6.51
- MySQL 8.0 through 9.5 get about 30% less QPS than 5.6.51
- There are few regressions after MySQL 8.0
- New CPU overheads explain the regressions. See the vmstat results for the scan test.
- for the read-only-distinct test, MySQL 5.7 to 9.5 are faster than 5.6.51
- for the read-only_range=X tests
- with the longest range scan (*_range=10000), MySQL 5.7.44 is faster than 5.6.51 and 8.0 to 9.5 have the same QPS as 5.6.51
- with shorter range scans (*_range=100 & *_range=10) MySQL 5.6.51 is faster than 5.7 to 9.5. This implies that the regressions are from code above the storage engine layer.
- From vmstat results the perf differences are explained by CPU overheads
- for the other tests
- MySQL 5.7.44 gets about 15% less QPS than 5.6.51
- MySQL 8.0 to 9.5 get about 30% less QPS than 5.6.51
- From vmstat results for read-only-count the reason is new CPU overhead
- for the read-only-distinct test, MySQL 5.7 to 9.5 are faster than 5.6.51
- for the read-only_range=X tests
- MySQL 5.7.44 is as fast as 5.6.51 for the longest range scan and faster than 5.6.51 for the shorter range scans
- MySQL 8.0 to 9.5 are much faster than 5.6.51 for the longest range scan and somewhat faster for the shorter range scans
- From vmstat results the perf differences are explained by CPU overheads and possible from changes in mutex contention
- for the other tests
- MySQL 5.7.44 gets about 20% less QPS than 5.6.51 for read-only-count and about 10% more QPS than 5.6.51 for read-only-simple and read-only-sum
- MySQL 8.0 to 9.5 get about 30% less QPS than 5.6.51 for read-only-count and up to 20% less QPS than 5.6.51 for read-only-simple and read-only-sum
- From vmstat results for read-only-count the reason is new CPU overhead
- For most tests
- MySQL 5.7.44 gets between 10% and 20% less QPS than 5.6.51
- MySQL 8.0 to 9.5 get between 40% to 50% less QPS than 5.6.51
- From vmstat results for the insert test, MySQL 5.7 to 9.5 use a lot more CPU
- For the update-index test
- MySQL 5.7.44 is faster than 5.6.51
- MySQL 8.0 to 9.5 get about 10% less QPS than 5.6.51
- From vmstat metrics MySQL 5.6.51 has more mutex contention
- For the update-inlist test
- MySQL 5.7.44 is as fast as 5.6.51
- MySQL 8.0 to 9.5 get about 30% less QPS than 5.6.51
- From vmstat metrics MySQL 5.6.51 has more mutex contention
- For all tests MySQL 5.7 to 9.5 get more QPS than 5.6.51
- From vmstat results for the write-only test MySQL 5.6.51 uses more CPU and has more mutex contention.
- For some tests (read-write_range=X) MySQL 8.0 to 9.5 get less QPS than 5.7.44
- These are the classic sysbench transaction with different range scan lengths and the performance is dominated by the range query response time, thus 5.7 is fastest.
- For most tests MySQL 5.7 to 9.5 have similar perf with two exceptions
- For the delete test, MySQL 8.0 to 9.5 are faster than 5.7. From vmstat metrics 5.7 uses more CPU and has more mutex contention than 8.0 to 9.5.
- For the update-inlist test, MySQL 8.0 to 9.5 are faster than 5.7. From vmstat metrics 5.7 uses more CPU than 8.0 to 9.5.











.png)

