This is part 3 in my (possibly) final series on performance regressions in MySQL using cached sysbench as the workload. For previous posts, see part 1 and part 2. This post covers performance differences between InnoDB in upstream MySQL 8.0.32, InnoDB in FB MySQL 8.0.32 and MyRocks in FB MySQL 8.0.32 using a server with 24 cores and 64G of RAM.
I don't claim that the MyRocks CPU overhead isn't relevant, but this workload (CPU-bound, database is cached) is a worst-case for it.
tl;dr
- InnoDB from FB MySQL is no worse than ~10% slower than InnoDB from upstream
- MyRocks is ~35% slower than InnoDB from upstream as it uses ~1.5X more CPU/query
- Fixing bug 1506 is important for InnoDB in FB MySQL
- For writes, MyRocks does worse at high concurrency than at low
- while MyRocks does much better than InnoDB for update-index at 1 thread, that benefit goes away at 16 threads
Much more detail on the benchmark and hardware is here. I am trying to avoid repeating that information in the posts that follow.
Results here are from the c24r64 server with 24 CPU cores and 64G of RAM. The benchmarks were repeated for 1 and 16 threads. On the charts below that is indicated by NT=1 and NT=16.
Builds
The previous post has more detail on the builds, my.cnf files and bug fixes.
- my8032_rel_o2nofp
- InnoDB from upstream MySQL 8.0.32
- fbmy8032_rel_o2nofp_end_241023_ba9709c9_971
- FB MySQL 8.0.32 at git hash ba9709c9 (as of 2024/10/23) using RocksDB 9.7.1. This supports InnoDB and MyRocks.
- fbmy8032_rel_o2nofp_241023_ba9709c9_971_bug1473_1481_1482_1506
- FB MySQL 8.0.32 at git hash ba9709c9 (as of 2024/10/23) using RocksDB 9.7.1 with patches applied for bugs 1473, 1481, 1482 and 1506, This supports InnoDB and MyRocks.
- rQPS is: (QPS for my version) / (QPS for base version)
- base version is InnoDB from upstream MySQL 8.0.32 (my8032_rel_o2nofp)
- my version is one of the other versions
- fbinno-nofix
- InnoDB from fbmy8032_rel_o2nofp_end_241023_ba9709c9_971
- fbinno-somefix
- InnoDB from fbmy8032_rel_o2nofp_241023_ba9709c9_971_bug1473_1481_1482_1506
- myrocks-nofix
- MyRocks from fbmy8032_rel_o2nofp_end_241023_ba9709c9_971
- myrocks-somefix
- MyRocks from fbmy8032_rel_o2nofp_241023_ba9709c9_971_bug1473_1481_1482_1506
Summary statistics: InnoDB
Summary:
- InnoDB from FB MySQL is no worse than 9% slower than InnoDB from upstream
- Fixing bug 1506 is important for InnoDB in FB MySQL
1 thread
16 threads
Summary statistics: MyRocks
Summary
- MyRocks does better at low concurrency than at high. The fix might be as simple as enabling the hyper clock block cache
- MyRocks is ~35% slower than upstream InnoDB
- For writes, MyRocks does worse at high concurrency than at low
1 thread
16 threads
Results: c24r64 with InnoDB and point queries
Summary
- results are stable here, InnoDB from FB MySQL is no worse than 10% slower than upstream
- the worst case for MyRocks are the tests that do point lookup on secondary indexes because that uses a range scan rather than a point lookup on the LSM tree, which means that bloom filters cannot be used
Summary
- the worst case for InnoDB from FB MySQL are the long range scans and fixing bug 1506 will be a big deal
Results: c24r64 with MyRocks and range queries
Summary
- while long range scans are the worst case here, bug 1506 is not an issue as that is InnoDB-only
Summary
- results are stable here, InnoDB from FB MySQL is no worse than ~10% slower than upstream
Results: c24r64 with MyRocks and writes
Summary
- while MyRocks does much better than InnoDB for update-index at 1 thread, that benefit goes away at 16 threads. It does better at update-index because it does blind writes rather than RMW for non-unique secondary index maintenance. Perhaps the issue at high concurrency is memory system stalls because this server has 2 sockets.
No comments:
Post a Comment