<div dir="ltr">Thanks Dotan for the insight<br><br><div class="gmail_quote">2009/9/8 Dotan Shavit <span dir="ltr"><<a href="mailto:dotan@shavitos.com">dotan@shavitos.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Tuesday 08 September 2009, Noam Rathaus wrote:<br>
> So I am stuck<br>
><br>
> Grrr<br>
><br>
> Anyone with ideas on how I can understand why "my packages" are causing<br>
> issues, while apparently, "perl-provided" packages such as LWP::UserAgent<br>
> dont?<br>
</div><a href="http://www.gksoft.com/a/fun/catch-lion.html" target="_blank">http://www.gksoft.com/a/fun/catch-lion.html</a><br>
<div><div></div><div class="h5"><br>
><br>
> On Tue, Sep 8, 2009 at 5:58 PM, Shachar Shemesh <<a href="mailto:shachar@shemesh.biz">shachar@shemesh.biz</a>> wrote:<br>
> > Noam Rathaus wrote:<br>
> ><br>
> > The only obvious one is that read() shown under strace, takes a<br>
> > significant more time on the new machine than the old one<br>
> ><br>
> > You can split the difference between the platforms into three groups:<br>
> > Time spent in the kernel (0.032 seconds)<br>
> > Time spent in userspace (7.761 seconds)<br>
> > Time spent sleeping or otherwise scheduled out (7.287 seconds)<br>
> ><br>
> > strace -c goes a long way, and works very hard, to show us information<br>
> > that is not useful to us. It counts CPU time spent in system calls, not<br>
> > actual wall time. What may provide a more useful output in this case is<br>
> > -T, which will also count time in which the process was sleeping inside a<br>
> > system call (which accounts for about half the slowdown).<br>
> ><br>
> > The second half of the slowdown, the one done in user space, is more<br>
> > difficult to trace without the sources (i.e. - the perl sources).<br>
> > valgrind has a module for detecting what causes a slowdown, but I doubt<br>
> > Noam wants to start analyzing perl to figure out what the different areas<br>
> > actually mean.<br>
> ><br>
> ><br>
> > Shachar<br>
> ><br>
> > On Tue, Sep 8, 2009 at 5:43 PM, Shachar Shemesh<br>
<<a href="mailto:shachar@shemesh.biz">shachar@shemesh.biz</a>>wrote:<br>
> >> Noam Meltzer wrote:<br>
> >><br>
> >> the time output does looks like you have higher cpu usage for some<br>
> >> reason, so i agree with Shachar on this.<br>
> >><br>
> >> you can also try to pinpoint the place the cpu is spent.<br>
> >> strace and/or ltrace with the '-f -c' flags can help.<br>
> >><br>
> >> I'm not sure about ltrace, but strace will not help. Most of the time<br>
> >> is spent in user space, not in the kernel.<br>
> >><br>
> >> Strace may help if the problem is time spent in another process (i.e. -<br>
> >> while the main process is sleeping), but it seems Noam has already tried<br>
> >> that one and failed to spot any obvious candidates.<br>
> >><br>
> >> Shachar<br>
> >><br>
> >> On Tue, Sep 8, 2009 at 5:24 PM, Shachar Shemesh<br>
<<a href="mailto:shachar@shemesh.biz">shachar@shemesh.biz</a>>wrote:<br>
> >>> Noam Rathaus wrote:<br>
> >>><br>
> >>> I know the time difference doesn't look too bad, but take a bigger code<br>
> >>> set:<br>
> >>><br>
> >>> Fast:<br>
> >>> real 0m1.682s<br>
> >>> user 0m1.584s<br>
> >>> sys 0m0.064s<br>
> >>><br>
> >>> Slow:<br>
> >>> real 0m16.730s<br>
> >>> user 0m9.345s<br>
> >>> sys 0m0.096s<br>
> >>><br>
> >>> These times spell "CPU intensive". Does your library do anything<br>
> >>> special? If you try to import a dummy library, does this still happen?<br>
> >>><br>
> >>> Shachar<br>
> >>><br>
> >>> --<br>
> >>> Shachar Shemesh<br>
> >>> Lingnu Open Source Consulting Ltd.<a href="http://www.lingnu.com" target="_blank">http://www.lingnu.com</a><br>
> >><br>
> >> --<br>
> >> Shachar Shemesh<br>
> >> Lingnu Open Source Consulting Ltd.<a href="http://www.lingnu.com" target="_blank">http://www.lingnu.com</a><br>
> ><br>
> > --<br>
> > Shachar Shemesh<br>
> > Lingnu Open Source Consulting Ltd.<a href="http://www.lingnu.com" target="_blank">http://www.lingnu.com</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>