This post has results to measure scaleup for MariaDB 11.8.3 on a 48-core server.
tl;dr
- Scaleup is better for range queries than for point queries
- For tests where results were less than great, the problem appears to be mutex contention within InnoDB
Builds, Configuration & Hardware
The server has an AMD EPYC 9454P 48-Core Processor with AMD SMT disabled, 128G of RAM and SW RAID 0 with 2 NVMe devices. The OS is Ubuntu 22.04.
I compiled MariaDB 11.8.3 from source and the my.cnf file is here.
Benchmark
(QPS at X clients) / (QPS at 1 client)
The goal is to determine scaleup efficiency for MariaDB. When the relative QPS at X clients is a value near X, then things are great. But sometimes things aren't great and the relative QPS is much less than X. One issue is data contention for some of the write-heavy microbenchmarks. Another issue is mutex and rw-lock contention.
Perf debugging via vmstat and iostat
I use normalized results from vmstat and iostat to help explain why things aren't as fast as expected. By normalized I mean I divide the average values from vmstat and iostat by QPS to see things like how much CPU is used per query or how many context switches occur per write. And note that a high context switch rate is often a sign of mutex contention.
Charts: point queries
The spreadsheet with all of the results is here.
For point queries
- tests for which the relative QPS at 48 clients is greater than 40
- point-query
- tests for which the relative QPS at 48 clients is between 30 and 40
- none
- tests for which the relative QPS at 48 clients is between 20 and 30
- hot-points, points-covered-si, random-points_range=10
- tests for which the relative QPS at 48 clients is between 10 and 20
- points-covered-pk, points-notcovered-pk, points-notcovered-si, random-points_range=100
- tests for which the relative QPS at 48 clients is less than 10
- random-points_range=1000
Charts: range queries without aggregation
The spreadsheet with all of the results is here.
For range queries without aggregation:
- tests for which the relative QPS at 48 clients is greater than 40
- range-covered-pk, range-covered-si, range-notcovered-pk
- tests for which the relative QPS at 48 clients is between 30 and 40
- scan
- tests for which the relative QPS at 48 clients is between 20 and 30
- none
- tests for which the relative QPS at 48 clients is between 10 and 20
- none
- tests for which the relative QPS at 48 clients is less than 10
- range-notcovered-si
Charts: range queries with aggregation
The spreadsheet with all of the results is here.
For range queries with aggregation:
- tests for which the relative QPS at 48 clients is greater than 40
- read-only-distinct, read-only-order, read-only-range=Y, read-only-sum
- tests for which the relative QPS at 48 clients is between 30 and 40
- read-only-count, read-only-simple
- tests for which the relative QPS at 48 clients is between 20 and 30
- none
- tests for which the relative QPS at 48 clients is between 10 and 20
- none
- tests for which the relative QPS at 48 clients is less than 10
- none
Charts: writes
The spreadsheet with all of the results is here.
For writes:
- tests for which the relative QPS at 48 clients is greater than 40
- none
- tests for which the relative QPS at 48 clients is between 30 and 40
- read-write_range=Y
- tests for which the relative QPS at 48 clients is between 20 and 30
- update-index, write-only
- tests for which the relative QPS at 48 clients is between 10 and 20
- delete, insert, update-inlist, update-nonindex, update-zipf
- tests for which the relative QPS at 48 clients is less than 10
- update-one