Hi Shlomi,

This snippet is from nytprof, and it's where it's spending most of the
time:

> Calls: 10631
> Exclusive Time: 28.2s
> Inclusive Time: 28.2s
> Subroutine: Net::SSLeay::write_partial (xsub)
> 
> On my desktop:
> Calls: 5057
> Exclusive Time: 45.0s
> Inclusive Time: 45.0s
> Subroutine: Net::SSLeay::write_partial (xsub)
 
One interesting thing is that besides being faster in older hardware
the ammount of calls is also higher in the old hardware.

I can send both html output for ntyprof if you are interested.

The problem is that on the oldest hardware runs faster. 
The SSLeay version is the same on both machines (version 1.72 - the
latest one haven't reach the stable repos yet)


Regards,
David Santiago


On Wed, 1 Jun 2016 22:23:51 +0300
Shlomi Fish <shlo...@shlomifish.org> wrote:

> On Wed, 1 Jun 2016 20:25:39 +0200
> David Emanuel da Costa Santiago <deman...@gmail.com> wrote:
> 
> > Hi!
> > 
> > I have a script that writes to a socket, but i noticed that the same
> > script have diferent speeds on different machines. It's faster on my
> > 5 year laptop than on my desktop.
> > 
> > I profiled the script on both machines and some functions are taking
> > almost the double of the time! Example:
> > 
> > on my laptop:
> > 
> > Calls: 10631
> > Exclusive Time: 28.2s
> > Inclusive Time: 28.2s
> > Subroutine: Net::SSLeay::write_partial (xsub)
> > 
> > On my desktop:
> > Calls: 5057
> > Exclusive Time: 45.0s
> > Inclusive Time: 45.0s
> > Subroutine: Net::SSLeay::write_partial (xsub)
> > 
> > 
> > Both machines have the same software version (OS, perl,..) and the
> > internet connection is the same. The hardware is different.
> > 
> > What puzzles me is that my desktop have better hardware (according
> > to the benchmarks on the internet) than my old laptop. However i
> > get way worse speeds on my desktop.
> > 
> > On both machines, when the script is running the CPU is around 7%,
> > and the RAM usage is between 50MB - 100MB.
> > 
> > The question for one million dollar is "Why?". And how can i improve
> > the performance of my desktop to reach the same speed as my laptop
> > (considering that i have better hardware on my desktop)? If i
> > recompile perl instead of using a binary package, will that make it
> > even? 
> 
> It may make it a little better, but it should work better on the
> newer machine as it is. You can try using
> https://metacpan.org/pod/Devel::NYTProf to see what consumes the most
> time on the slower-to-run-it machine and see if  you've missed
> something.
> 
> Regards,
> 
>       Shlomi Fish
> 
> > 
> > 
> > Regards,
> > David Santiago
> >   
> 
> 
> 


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to