Perl slowness
Noam Rathaus
noamr at beyondsecurity.com
Wed Sep 9 13:31:20 IDT 2009
1) I know DB takes time to load, how will this help me?
2) /dev/zero took on the old machine 11second, on the new machine 6seconds -
doesn't really help as I already knew the new HW is faster on disk - this
through hdparm's speed testing
3) no entropy is access DB is a wrapper around DBI, nothing more... in any
case both running of that entropy returned almost immediately
2009/9/9 Arie Skliarouk <skliarie at gmail.com>
> 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
>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cs.huji.ac.il/pipermail/linux-il/attachments/20090909/c6ef7c9c/attachment.html>
More information about the Linux-il
mailing list