<div dir="ltr">Hi Gabor,<br><br>I didn't check the network traffic, or name resolving, though both are quite fast<br><br>Both are running v5.10.0 i486-linux-gnu-thread-multi<br><br>They are on different networks<br><br>
I don't think its a "name" collision, I agree the name DB is not a good choice :)<br><br>tcpdump shows no name resolution occuring during the execution - so I don't think is the issue<br><br>The DB package, connects to the mysql via socket, other packages I tried that are also slow, don't connect to mysql<br>
<br>In any case, MySQL responds within milliseconds to a connection request, so I don't think this is the issue.<br><br><div class="gmail_quote">On Tue, Sep 8, 2009 at 4:51 PM, Gabor Szabo <span dir="ltr"><<a href="mailto:szabgab@gmail.com">szabgab@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2009/9/8 Noam Rathaus <<a href="mailto:noamr@beyondsecurity.com">noamr@beyondsecurity.com</a>>:<br>
<div><div></div><div class="h5">> Hi,<br>
><br>
> I have two machines, their hardware is not identical, but their installation<br>
> is.<br>
><br>
> One is a 3 years old DELL server, while the other is a 1 year old server.<br>
><br>
> One is running 2.6.26-2-686 while the other 2.6.30-1-686<br>
><br>
> What I am seeing is slow startup - emphasis on startup, the code works fast<br>
> once its running - of perl scripts<br>
><br>
> Even the smallest perl script such as this:<br>
> ===<br>
> #!/usr/bin/perl<br>
><br>
> use lib '/usr/local/MySystem/lib';<br>
><br>
> use DB;<br>
><br>
> ===<br>
><br>
> Take 7 seconds to start, in comparison to 0.030secods<br>
><br>
> If I don't use the "use DB;" which my package<br>
><br>
> It loads fast<br>
><br>
> I am trying to figure out why, I checked the HD speeds via hdparam, the<br>
> newer server is 1.5 times faster 103MB/sec<br>
><br>
> I tried to see what libraries were being used, used strace, but I can't see<br>
> something "big" that is causing the delay.<br>
><br>
> The "use DB;" can be replaced with any other "custom" library package I<br>
> wrote, they all take 2-7 seconds to load, while on the other machine it<br>
> takes negligible time<br>
><br>
> Does someone have a "thread" to cling to?<br>
<br>
</div></div>DB ?<br>
Why would you call a package DB, that's the debugger back-end of Perl.<br>
In any case I would rename those packages to something like<br>
BeyondSecurity::DB<br>
<br>
Are there the same versions of Perl?<br>
Maybe one of them is actually loading the Perl debugger ?<br>
Though that should not be slow either.<br>
<br>
Have you checked for network activity while you are running the script?<br>
<br>
Maybe it is trying to connect somewhere and it is slower (or no<br>
backward name resolving ?)<br>
<font color="#888888"><br>
Gabor<br>
<br>
</font></blockquote></div><br></div>