Open jcua-helpscout opened 1 year ago
This is a really interesting and detailed summary, but I'm afraid I'm struggling to understand what we as the image packagers could do about it? :sweat_smile:
We take the binaries published by Oracle (for both Debian and Oracle Linux-based images) and package them pretty faithfully with very minimal configuration differences from the stock packages provided by upstream. :bow:
I see what you are saying about taking the binaries published by Oracle. So, using the same specifications as defined in my "Environment 2" above, I installed the 2 different MySQL versions natively (eg. using apt-get install), then I ran the same Sysbench test. This was the results:
5.7.42 | 8.0.33 (vanilla) | 8.0.33 (skip-log-bin) | |
---|---|---|---|
transactions/sec | 483.60/sec | 306.87/sec | 520.02/sec |
queries/sec | 9671.90/sec | 6137.38/sec | 10400.32/sec |
This is what the columns represent:
Based on these results:
So, I applied the same variable ("skip-log-bin") to the docker image for MySQL 8.0.33 running on a freshly installed AWS EC2 (t2.2xlarge) instance. The command is:
$ docker run --platform=linux/amd64 --name=mysql2 -p 3310:3306/tcp -e MYSQL_ROOT_PASSWORD="test" -d mysql:8.0.33 --skip-log-bin
Then I ran the same Sysbench against this and here's the result:
5.7.41 (AWS EC2) | 8.0.33 (AWS EC2- vanilla) | 8.0.33 (skip-log-bin) | |
---|---|---|---|
transactions/sec | 354.86/sec | 178.66/sec | 276.67/sec |
queries/sec | 7097.24/sec | 3573.29/sec | 5533.94/sec |
The two columns called "5.7.41 (AWS EC2)" and "8.0.33 (AWS EC2 - vanilla)" were from my original testing, I just added them here for easier comparison.
In the case of 8.0.33 with the skip-log-bin variable (last column), the performance is still not on par with 5.7.41. The query rate for 8.0.33 is 5533.94 queries/sec, while 5.7.41 is 7097.24 queries/sec.
If we examine the native test, 8.0.33 with the skip-log-bin variable performs significantly better, reaching 10400.32 queries/sec, which is comparable to 5.7.42 9671.90 queries/sec.
Given these results, I expected the performance of MySQL 8.0.33 with the skip-log-bin variable to have improved in a Docker environment, but it did not. Do you have some possible insights as to why this apparent performance change is not visible in a Docker environment?
@jcua-helpscout
So MySQL will ways be slower on docker ? Have used volumes or bind mount ?
Issue Summary
When running a Sysbench test, it looks like the performance of MySQL 8.0.33 (amd64) is slower compared to MySQL 5.7.41 (amd64) when running in Mac (arm64) or in AWS EC2 Instance (amd64). I would have expected that 8.0.33 to be faster given that it is a newer version.
Environment
Steps to Reproduce (applicable for both environments)
Setup of the 2 MySQL versions
Run the tests
Sysbench Results on Mac Pro
For 5.7.41 on Mac Pro:
For 8.0.33 on Mac Pro:
Sysbench Results on AWS EC2
For 5.7.41 on AWS EC2:
For 8.0.33 on AWS EC2:
Summary of the Results
Expected Behavior
Based on the results, I expected that MySQL 8.0.33 should be faster given that it is a newer version, but it looks like MySQL 5.7.41 is faster. Is this a known issue?