This post provides another way to see the performance regressions in MySQL from versions 5.6 to 9.7. It complements what I shared in a recent post. The workload here is cached by InnoDB and my focus is on regressions from new CPU overheads.
The good news is that there are few regressions after 8.0. The bad news is that there were many prior to that and these are unlikely to be undone.
tl;dr
- for point queries
- there are large regressions from 5.6.51 to 5.7.44, 5.7.44 to 8.0.28 and 8.0.28 to 8.0.45
- there are few regressions from 8.0.45 to 8.4.8 to 9.7.0
- for range queries without aggregation
- there are large regressions from 5.6.51 to 5.7.44 and 5.7.44 to 8.0.28
- there are mostly small regressions from 8.0.28 to 8.0.45, but scan has a large regression
- there are few regressions from 8.0.45 to 8.4.8 to 9.7.0
- for range queries with aggregation
- there are large regressions from 5.6.51 to 5.7.44 with two improvements
- there are large regressions from 5.7.44 to 8.0.28
- there are small regressions from 8.0.28 to 8.0.45
- there are few regressions from 8.0.45 to 8.4.8 to 9.7.0
- for writes
- there are large regressions from 5.6.51 to 5.7.44 and 5.7.44 to 8.0.28
- there are small regressions from 8.0.28 to 8.0.45
- there are few regressions from 8.0.45 to 8.4.8
- there are a few small regressions from 8.4.8 to 9.7.0
The server is an ASUS ExpertCenter PN53 with AMD Ryzen 7 7735HS, 32G RAM and an m.2 device for the database. More details on it are here. The OS is Ubuntu 24.04 and the database filesystem is ext4 with discard enabled.
The my.cnf files are here for 5.6, 5.7 and 8.4. I call these the z12a configs.
For 9.7 I use the z13a config. It is as close as possible to z12a and adds two options for gtid-related features to undo a default config change that arrived in 9.6.
All DBMS versions use the latin1 character set as explained here.
Benchmark
The tests are run using 1 table with 50M rows. The read-heavy microbenchmarks run for 600 seconds and the write-heavy for 1800 seconds.
I provide tables below with relative QPS. When the relative QPS is > 1 then some version is faster than the base version. When it is < 1 then there might be a regression. The relative QPS (rQPS) is:
(QPS for some version) / (QPS for base version)
- from 5.6.51 to 9.7.0
- the median regression is a drop in rQPS of 27 basis points
- from 5.6.51 to 5.7.44
- the median regression is a drop in rQPS of 11 basis points
- from 5.7.44 to 8.0.28
- the median regression is a drop in rQPS of 25 basis points
- from 8.0.28 to 8.0.45
- 7 of 9 tests get more QPS with 8.0.45
- 2 tests have regressions where rQPS drops by ~6 basis points
- from 8.0.45 to 8.4.8
- there are few regressions
- from 8.4.8 to 9.7.0
- there are few regressions
- the largest regression is an rQPS drop of 38 basis points for point-query. Compared to most of the other tests in this section, this query does less work in the storage engine which implies the regression is from code above the storage engine.
- the smallest regression is an rQPS drop of 15 basis points for random-points_range=1000. The regression for the same query with a shorter range (=10, =100) is larger. That implies, at least for this query, that the regression is for something above the storage engine (optimizer, parser, etc).
- the median regression is an rQPS drop of 27 basis points
- the largest regression is an rQPS drop of 14 basis points for hot-points.
- the next largest regression is an rQPS drop of 13 basis points for random-points with range=10. The regressions for that query are smaller when a larger range is used =100, =1000 and this implies the problem is above the storage engine.
- the median regression is an rQPS drop of 11 basis points
- the largest regression is an rQPS drop of 66 basis points for random-points with range=1000. The regression for that same query with smaller ranges (=10, =100) is smaller. This implies the problem is in the storage engine.
- the second largest regression is an rQPS drop of 35 basis points for hot-points
- the median regression is an rQPS drop of 25 basis points
- at last, there are many improvements. Some are from a fix for bug 102037 which I found with help from sysbench
- the regressions, with rQPS drops by ~6 basis points, are for queries that do less work in the storage engine relative to the other tests in this section
- there are few regressions from 8.0.45 to 8.4.8
- there are few regressions from 8.4.8 to 9.7.0
- from 5.6.51 to 9.7.0
- the median regression is drop in rQPS of 33 basis points
- from 5.6.51 to 5.7.44
- the median regression is a drop in rQPS of 16 basis points
- from 5.7.44 to 8.0.28
- the median regression is a drop in rQPS ~10 basis points
- from 8.0.28 to 8.0.45
- the median regression is a drop in rQPS of 5 basis points
- from 8.0.45 to 8.4.8
- there are few regressions from 8.0.45 to 8.4.8
- from 8.4.8 to 9.7.0
- there are few regressions from 8.4.8 to 9.7.0
- all tests have large regressions with an rQPS drop that ranges from 26 to 34 basis points
- the median regression is an rQPS drop of 33 basis points
- all tests have large regressions with an rQPS drop that ranges from 12 to 17 basis points
- the median regression is an rQPS drop of 16 basis points
- 4 of 5 tests have regressions with an rQPS drop that ranges from 10 to 14 basis points
- the median regression is ~10 basis points
- rQPS improves for the scan test
- all tests are slower in 8.0.45 than 8.0.28, but the regression for 3 of 5 is <= 5 basis points
- rQPS in the scan test drops by 21 basis points
- the median regression is an rQPS drop of 5 basis points
- there are few regressions from 8.0.45 to 8.4.8
- there are few regressions from 8.4.8 to 9.7.0
- from 5.6.51 to 9.7.0 rQPS
- the median result is a drop in rQPS of ~30 basis points
- from 5.6.51 to 5.7.44
- the median result is a drop in rQPS of ~10 basis points
- from 5.7.44 to 8.0.28
- the median result is a drop in rQPS of ~12 basis points
- from 8.0.28 to 8.0.45
- the median result is an rQPS drop of 5 basis points
- from 8.0.45 to 8.4.8
- there are few regressions from 8.0.45 to 8.4.8
- from 8.4.8 to 9.7.0
- there are few regressions from 8.4.8 to 9.7.0
- the median result is a drop in rQPS of ~30 basis points
- rQPS for the read-only-distinct test improves by 25 basis point
- the median result is an rQPS drop of ~10 basis points
- rQPS improves by 45 basis points for read-only-distinct and by 23 basis points for read-only with the largest range (=10000)
- the median result is an rQPS drop of ~12 basis points
- the median result is an rQPS drop of 5 basis points
- there are few regressions from 8.0.45 to 8.4.8
- there are few regressions from 8.4.8 to 9.7.0
- from 5.6.51 to 9.7.0 rQPS
- the median result is a drop in rQPS of ~33 basis points
- from 5.6.51 to 5.7.44
- the median result is an rQPS drop of ~13 basis points
- from 5.7.44 to 8.0.28
- the median result is an rQPS drop of ~18 basis points
- from 8.0.28 to 8.0.45
- the median result is an rQPS drop of 9 basis points
- from 8.0.45 to 8.4.8
- there are few regressions from 8.0.45 to 8.4.8
- from 8.4.8 to 9.7.0
- the median result is an rQPS drop of 4 basis points
- the median result is an rQPS drop of ~33 basis points
- the median result is an rQPS drop of ~13 basis points
- rQPS improves by 21 basis points for update-index and by 5 basis points for update-inlist
- the median result is an rQPS drop of ~18 basis points
- the median result is an rQPS drop of 9 basis points
- there are few regressions from 8.0.45 to 8.4.8
- the median result is an rQPS drop of 4 basis points
No comments:
Post a Comment