Perl slowness

Perl slowness

Arie Skliarouk skliarie at gmail.com
Wed Sep 9 12:09:52 IDT 2009


Try to run the following on both machines:

#!/usr/bin/perl
use Time::HiRes;
($seconds, $microseconds) = Time::HiRes::gettimeofday;
print "Start: $seconds.$microseconds\n";

use DB;

($seconds, $microseconds) = Time::HiRes::gettimeofday;
print "loaded DB: $seconds.$microseconds\n";


Besides "use DB" stick couple more libraries and print the timestamp after
each one.

Test write speed of disks:
time (dd if=/dev/zero of=/tmp/abc bs=1M count=500 && sync)

One of the things the "use DB" does it to load several bytes of entropy from
/dev/random. If the newer machine has much activity, the /dev/random will
not block. Idle machine might require some time to gather entropy. Test the
entropy as follows:
time dd if=/dev/random of=/dev/null bs=100000 count=1

--
Arie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090909/5106f7af/attachment.html>


More information about the Linux-il mailing list