Perl Monk, Perl Meditation | |
PerlMonks |
Much slower execution from one machine to anotherby df4or (Initiate) |
on Jun 03, 2016 at 15:43 UTC ( [id://1164878]=perlquestion: print w/replies, xml ) | Need Help?? |
df4or has asked for the wisdom of the Perl Monks concerning the following question: I understand that our problem might not(only|at all) be related to Perl, but since this is the language of choice and I know there is a lot of wisdom to be found here, I beg to ask... When migrating several older Perl programs from an old to a new server we saw a dramatic decrease in execution speed, although the newer machine should be much faster. Old machine: New machine: The difference in one task was about 10-fold (i.e. the script took more than 10 times as long to run on the new machine, 0m58 vs. 11m). In another case the slow down was about 4 to 8-fold. Measurements were taken with the 'time' command on the command line. The slowest program reads a dBase database table sequentially, mangles the data a bit and writes the records to a text and to a MariaDB SQL table. When commenting out the only $sth->execute statement the execution time jumps up from 11 minutes to 38 seconds. Some careful performance tuning on the MySQL/MariaDB server brought the execution time down to 2m40 (from 11m), still about 3 times slower than the old machine. Another program, which does not use SQL, reads a dBase file, mangles the data a bit and writes them to a text file. Here the slowdown is about 4-fold. Some analysis with Devel::NYTProf found that most time is spent in IO::Handle which in turn is called by XBase.pm. What I did and concluded so far:
My question: Any help is highly appreciated. Thanks in advance,
Back to
Seekers of Perl Wisdom
|
|