Perl performance issue

C

Cameron McCormack

Hi everyone.

I am migrating my web/mail/svn/etc. servers from a computer connected to
my ADSL at home, an old Athlon 800, to a hosted Celeron 2.4GHz machine.
I found though that Perl runs much more slowly on the new machine and I
really don't know why. The problem seems to show itself mostly when
loading modules (though this could just be because there is lots of
code in the modules).

For example on my old machine:

jet:~ $ for x in . . .; do time perl -MCPAN -e1; done

real 0m0.167s
user 0m0.158s
sys 0m0.008s

real 0m0.166s
user 0m0.156s
sys 0m0.009s

real 0m0.167s
user 0m0.159s
sys 0m0.007s

and on the new machine:

arc:~ $ for x in . . .; do time perl -MCPAN -e1; done

real 0m2.310s
user 0m2.280s
sys 0m0.030s

real 0m2.320s
user 0m2.270s
sys 0m0.050s

real 0m2.326s
user 0m2.300s
sys 0m0.030s

Actually, even without loading the CPAN module there is an appreciable
difference:

port:~ $ for x in . . .; do time perl -e1; done

real 0m0.009s
user 0m0.004s
sys 0m0.005s

real 0m0.010s
user 0m0.004s
sys 0m0.006s

real 0m0.009s
user 0m0.005s
sys 0m0.003s

arc:/tmp $ for x in . . .; do time perl -e1; done

real 0m0.069s
user 0m0.060s
sys 0m0.000s

real 0m0.067s
user 0m0.060s
sys 0m0.000s

real 0m0.069s
user 0m0.060s
sys 0m0.010s

I did multiple tests to (hopefully) discount issues of disk speed. Both
machines are using the same Debian package versions (5.8.7-4).

Anyone know why this might be (with the little information I've given)
or be able to help me diagnose the problem properly?

Also, if there's a more appropriate forum for this question, please
point me towards it.

Thanks,

Cameron
 
B

brian d foy

Hi everyone.

I am migrating my web/mail/svn/etc. servers from a computer connected to
my ADSL at home, an old Athlon 800, to a hosted Celeron 2.4GHz machine.
I found though that Perl runs much more slowly on the new machine and I
really don't know why.

Compare the two perl binary (perl -V) and see what's different
about them. :)
 
C

Cameron McCormack

brian said:
Compare the two perl binary (perl -V) and see what's different
about them. :)

I did compare the output of 'perl -V' on both machines, and the only
difference was that on my old machine there are a couple of extra paths
in @INC.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top