Re: Script runs slower with better hardware

2016-06-02 Thread David Santiago
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. R

Re: Script runs slower with better hardware

2016-06-02 Thread James Alton
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://sand

Re: Script runs slower with better hardware

2016-06-01 Thread David Emanuel da Costa Santiago
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 shoul

Re: Script runs slower with better hardware

2016-06-01 Thread James Alton
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

Re: Script runs slower with better hardware

2016-06-01 Thread David Emanuel da Costa Santiago
Unfortunatelly i don't have a third box. :-( I'm going to follow your advice and send an email to p5p. Thank you! Best regards, David Santiago On Wed, 1 Jun 2016 16:17:47 -0400 Uri Guttman wrote: > On 06/01/2016 04:04 PM, David Emanuel da Costa Santiago wrote: > > Hi Kent, > > > > They are u

Re: Script runs slower with better hardware

2016-06-01 Thread David Emanuel da Costa Santiago
The openssl version is 1.0.2.h. Thanks for your help. I'm going to follow Uri's advice and send an email to p5p list. Thank you! Regards, David Santiago On Thu, 2 Jun 2016 08:18:23 +1200 Kent Fredric wrote: > On 2 June 2016 at 08:04, David Emanuel da Costa Santiago > wrote: > > They are us

Re: Script runs slower with better hardware

2016-06-01 Thread Kent Fredric
On 2 June 2016 at 08:04, David Emanuel da Costa Santiago wrote: > They are using the same verion of Net::SSLeay (version 1.72). All the > software have the same version. No, not Net::SSLeay ... OpenSSL, which it links against. And if you recently upgraded/downgraded OpenSSL to match versions, N

Re: Script runs slower with better hardware

2016-06-01 Thread Uri Guttman
On 06/01/2016 04:04 PM, David Emanuel da Costa Santiago wrote: Hi Kent, They are using the same verion of Net::SSLeay (version 1.72). All the software have the same version. This is not random. This happens 100% of the times. All the settings related to this script are the same. I don't think

Re: Script runs slower with better hardware

2016-06-01 Thread David Emanuel da Costa Santiago
Hi Kent, They are using the same verion of Net::SSLeay (version 1.72). All the software have the same version. This is not random. This happens 100% of the times. All the settings related to this script are the same. I don't think it's my network card, because i can reach the maximum speed u

Re: Script runs slower with better hardware

2016-06-01 Thread David Emanuel da Costa Santiago
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: N

Re: Script runs slower with better hardware

2016-06-01 Thread David Emanuel da Costa Santiago
No. My laptop doesn't have TPM (at least there's no option in the BIOS to enable/disable and there's nothing in /sys/class/tpm/ ). My desktop have, but not enabled: desktop$ cat /sys/class/tpm/tpm0/device/enabled 0 desktop$ Do you think it's because of that? With other applications i can reach

Re: Script runs slower with better hardware

2016-06-01 Thread Kent Fredric
On 2 June 2016 at 06:25, David Emanuel da Costa Santiago wrote: > 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 us

Re: Script runs slower with better hardware

2016-06-01 Thread Shlomi Fish
On Wed, 1 Jun 2016 20:25:39 +0200 David Emanuel da Costa Santiago 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 ma

Re: Script runs slower with better hardware

2016-06-01 Thread Shlomi Fish
On Wed, 1 Jun 2016 20:25:39 +0200 David Emanuel da Costa Santiago 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 ma

Script runs slower with better hardware

2016-06-01 Thread David Emanuel da Costa Santiago
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 lapt