Perl slowness

Perl slowness

Noam Rathaus noamr at beyondsecurity.com
Tue Sep 8 16:27:57 IDT 2009


Both machines return around the 0m0.013s value, while the newer one shows a
lower value, not by much (even though it is a 160gb disk, in comparison to
the 40gb disk).

2009/9/8 Arie Skliarouk <skliarie at gmail.com>

> Try to measure disk seek time on both disks:
>
>  time echo $(dd if=/dev/sda of=/dev/null count=1 bs=512; dd if=/dev/sda
> of=/dev/null count=1 bs=1 skip=200049647116;)
>
> Replace the last number with size of the disk - several bytes (check using
> fdisk -l).
> The operation would give meaningful result only the first time you run it.
>
> If someone has better way to check disk seek speed, please share.
>
> Are you running the script as root?
> Do you get the same slow results each time you run it or only the first
> time?
> Is there disk thrashing during startup?
>
> --
> Arie
>
>
>
> 2009/9/8 Noam Rathaus <noamr at beyondsecurity.com>
>
>> Everything is on the /dev/sda
>>
>> And local
>>
>> That is not the answer...
>>
>>
>> On Tue, Sep 8, 2009 at 3:28 PM, Gabor Szabo <szabgab at gmail.com> wrote:
>>
>>> 2009/9/8 Noam Rathaus <noamr at beyondsecurity.com>:
>>> > Hi,
>>> >
>>> > I have two machines, their hardware is not identical, but their
>>> installation
>>> > is.
>>> >
>>> > One is a 3 years old DELL server, while the other is a 1 year old
>>> server.
>>> >
>>> > One is running 2.6.26-2-686 while the other 2.6.30-1-686
>>> >
>>> > What I am seeing is slow startup - emphasis on startup, the code works
>>> fast
>>> > once its running - of perl scripts
>>> >
>>> > Even the smallest perl script such as this:
>>> > ===
>>> > #!/usr/bin/perl
>>> >
>>> > use lib '/usr/local/MySystem/lib';
>>> >
>>> > use DB;
>>> >
>>> > ===
>>> >
>>> > Take 7 seconds to start, in comparison to 0.030secods
>>> >
>>> > If I don't use the "use DB;" which my package
>>> >
>>> > It loads fast
>>> >
>>> > I am trying to figure out why, I checked the HD speeds via hdparam, the
>>> > newer server is 1.5 times faster 103MB/sec
>>> >
>>> > I tried to see what libraries were being used, used strace, but I can't
>>> see
>>> > something "big" that is causing the delay.
>>> >
>>> > The "use DB;" can be replaced with any other "custom" library package I
>>> > wrote, they all take 2-7 seconds to load, while on the other machine it
>>> > takes negligible time
>>> >
>>> > Does someone have a "thread" to cling to?
>>> >
>>>
>>>
>>> A wide guess is that it is searching the @INC and on one system
>>> @INC points to a slow disk maybe via NFS ?
>>>
>>> Gabor
>>>
>>>
>>
>> _______________________________________________
>> Linux-il mailing list
>> Linux-il at cs.huji.ac.il
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>
>>
>
> _______________________________________________
> 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/20090908/82fecbd4/attachment.html>


More information about the Linux-il mailing list