MySQL Forums
Forum List  »  Performance

Bad performance on MySQL 8.0 compared to 5.7
Posted by: Raphael Yeung
Date: August 15, 2022 07:53PM

Hello,

I am a newbie on MySQL.
I am working on a performance testing task comparing between MySQL 8.0 and 5.7.
2 VMs are installed with 5.7 or 8.0 on each side.
Using mysqlslap for benchmark and having the result that 8.0 works slower.
I would like to have some advice.


mysqlslap command used:

###
/usr/local/mysql/bin/mysqlslap \
--no-defaults \
--concurrency=50 \
--iterations=10 \
--engine=innodb \
--auto-generate-sql \
--auto-generate-sql-add-autoincrement \
--auto-generate-sql-load-type=mixed \
--auto-generate-sql-write-number=1000 \
--number-of-queries=100000 \
--host=localhost \
--port=3306 \
--user=root
###

benchmark results:

## 5.7 ##
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 18.146 seconds
Minimum number of seconds to run all queries: 16.727 seconds
Maximum number of seconds to run all queries: 22.460 seconds
Number of clients running queries: 50
Average number of queries per client: 2000
######

## 8.0 ##
Benchmark
Running for engine innodb
Average number of seconds to run all queries: 26.603 seconds
Minimum number of seconds to run all queries: 24.865 seconds
Maximum number of seconds to run all queries: 28.906 seconds
Number of clients running queries: 50
Average number of queries per client: 2000
######

Here is the testing environment:
Machine: Azure VM (spec: Standard_D2s_v3)
OS: Ubuntu 20.04.4 LTS (Focal Fossa)
MySQL: 5.7.37 / 8.0.30 (both are installed by make install flow)
Data disk: copied a snapshot from a 5.7 DB, created a volume from the snapshot.
The other hardware spec are the same.

######

And the results of "show variables" will be attached in the coming thread.
Thank you for your attention and I hope I can get some help.

Regards,
Raphael

Options: ReplyQuote


Subject
Views
Written By
Posted
Bad performance on MySQL 8.0 compared to 5.7
646
August 15, 2022 07:53PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.