I'm trying to figure out why a Perl script I have, isn't performing anywhere near as well once I put it on the live server.
The whole script is identical on both servers (one is a test server, the other the live one). Both are running this version of Perl:
This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
(with 73 registered patches, see perl -V for more detail)
The dev server is running:
mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using EditLine wrapper
Whereas the live server is on a slightly different version:
mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper
my.cnf files are the same on both servers. Could having such a smaller difference in mySQL versions cause the speed issues? Both servers are 8GB RAM,
The script has a lot of work to do (building static pages for a directory), and takes this long on each server:
- Dev server: 40 minutes
- Live server: 2 hours 20 minutes
As you can see, that's a whopping difference. Any suggestions on what else I could try?
Here is how htop
looks on the live server when running the script:
and then on the dev server:
Doesn't seem to be much in it (or any swap being used)