Hi James.

I'm going to take a look into the perf utility. The `openssl speed`
command shows that the desktop cpu has a bigger throughput than the
laptop, so the write_partial in the desktop shouldn't spend that much
time (in comparison to laptop).

The output of the openssl command is attached.

Regards.
David Santiago

2016-06-02 16:59 GMT+02:00 James Alton <jamesalton...@gmail.com>:
> The laptop has better specs in terms of number of threads and memory
> bandwidth.  I'd also have a play around with the "perf" command if all other
> software versions are the same and you want to see if the lower level CPU
> usage is different.
> https://perf.wiki.kernel.org/index.php/Tutorial
> http://sandsoftwaresound.net/perf/perf-tut-count-hw-events/
>
> James Alton
>
> On Thu, Jun 2, 2016 at 12:25 AM, David Emanuel da Costa Santiago
> <deman...@gmail.com> wrote:
>>
>>
>> Hello James,
>>
>> The CPUs are
>>
>> Laptop CPU: i7 Q 720
>> Desktop CPU: i5 6500T
>>
>> The rest of software i'm using:
>>
>> Perl version: 5.22
>> Net::SSLeay version: 1.72
>> Openssl version: 1.0.2.h
>> OS: Archlinux up to date.
>>
>>
>> The script is single threaded and i'm using a single
>> IO::Select->select() to know when i should write or read.
>>
>> CPU comparison:
>> http://cpuboss.com/cpus/Intel-Core-i7-720QM-vs-Intel-Core-i5-6500T
>>
>>
>>
>> Regards,
>> David Santiago
>>
>> On Wed, 1 Jun 2016 19:20:00 -0600
>> James Alton <jamesalton...@gmail.com> wrote:
>>
>> > Can you please give specs on both CPUs? (The exact manufacturer and
>> > model.)
>> >
>> > Is there a reason why you think one CPU is better than another? You
>> > can have a CPU that's old and fast at single threaded jobs (say an old
>> > overclocked dual core 4.0Ghz CPU) and a newer CPU that's slower at
>> > single threaded jobs and faster at multi-threaded jobs (say a Core i7
>> > 3.2GHz). Is the program you're trying to run written in such a way as
>> > to take advantage of multi-threading? Was the benchmark you mentioned
>> > a single threaded or multi-threaded benchmark?
>> >
>> > Best wishes,
>> > James Alton
>> >
>> >
>> > On Wed, Jun 1, 2016 at 12:25 PM, 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?
>> > >
>> > >
>> > >
>> > > Regards,
>> > > David Santiago
>> > >
>> > > --
>> > > To unsubscribe, e-mail: beginners-unsubscr...@perl.org
>> > > For additional commands, e-mail: beginners-h...@perl.org
>> > > http://learn.perl.org/
>> > >
>> > >
>> > >
>>
>

Attachment: openssl_speed_laptop
Description: Binary data

Attachment: openssl_speed_desktop
Description: Binary data

-- 
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