简体   繁体   中英

MySQL 5.7 3x slower than 5.5 for same test suite

I recently upgraded my machine from:

i7-860 (12GB RAM, 120GB SSD) running Ubuntu 14.04 and MySQL 5.5 (OLD)

To a new machine:

i7-7560U (16GB RAM, 512GB SSD) running Ubuntu 16.04 and MySQL 5.7 (NEW)

Both machines have the same PHP configuration (7.1) and the out of the box MySQL configuration for their respective versions.

On the OLD machine, my phpunit test suite ran in 5.5 seconds and on the NEW machine, it runs in 20 seconds . I have narrowed the problem down to MySQL. Each test boots the framework and resets the database (drops/adds schema). I believe the database reset is the cause of the slowdown.

I know my new machine has 1/2 the cores/threads but could that cause the slow down I am seeing? I ran sysbench on both machines and received comparable results (MySQL had more transactions/second on the new machine).

Is there any configuration tuning for MySQL 5.7 I could do to improve performance?

Something I'm missing?

You could use this tool to generate an optimised my.cnf mysql server configuration for your server https://tools.percona.com

We have used this tool's output in production server to get really good speed in the past as opposed to the default setting mysql server comes out of the box.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM