> I have a server where the computer that I log into is a Mac Xserver
> 2.2
[quoted text clipped - 24 lines]
> Is there something I can check on to see what is going on? Its almost
> like the mac doesn't use all of its resources when it runs the code.
Mac OS X doesn't throttle processes that I know of, so if your CPU is
at 90% idle, your script is probably waiting on either disk or
network IO. You could try profiling your script with Devel::DProf to
get a breakdown on where the time is being spent in your script.
Another very simple benchmark is to run your script with "time
myscript.pl". That will report the real (i.e. wall clock) time spent,
the user (i.e. your script) time, and the sys (i.e. OS) time. Time
spent waiting on disk or network is reported as sys time here.
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Brett W Grant - 27 Feb 2007 17:10 GMT
I was using time script.plx to get the times. On the Mac
39.916u 14.315s 0:55.51 97.6% 0+0k 0+59io 0pf+0w
on the xeon
5.918u 1.361s 0:16.8 43.2% 0+0k 0+0io 0pf+0w
I'll look into the Dprof module, I am not sure that it is installed, well
I know that it is not on the xeons. I am not sure what the 0+59io means.
Also, when I say 90% idle, that means the moment before I execute the
job.
Thanks for the help,
Brett Grant
Sherm Pendley <sherm@dot-app.org>
02/27/2007 09:45 AM
To
Brett_W_Grant@raytheon.com
cc
macosx@perl.org
Subject
Re: perl code on mac slow
> I have a server where the computer that I log into is a Mac Xserver
> 2.2
[quoted text clipped - 24 lines]
> Is there something I can check on to see what is going on? Its almost
> like the mac doesn't use all of its resources when it runs the code.
Mac OS X doesn't throttle processes that I know of, so if your CPU is
at 90% idle, your script is probably waiting on either disk or
network IO. You could try profiling your script with Devel::DProf to
get a breakdown on where the time is being spent in your script.
Another very simple benchmark is to run your script with "time
myscript.pl". That will report the real (i.e. wall clock) time spent,
the user (i.e. your script) time, and the sys (i.e. OS) time. Time
spent waiting on disk or network is reported as sys time here.
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net
Daniel T. Staal - 27 Feb 2007 17:21 GMT
> I was using time script.plx to get the times. On the Mac
>
[quoted text clipped - 8 lines]
> means. Also, when I say 90% idle, that means the moment before I execute
> the job.
I think that 0+59io is output operations. Which could well be the speed
difference.
Any particular reason why this script might cause output on the Mac but
not the others?
Daniel T. Staal
---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------
Brett W Grant - 27 Feb 2007 18:37 GMT
So I finally got Devel::Profile working. It would not work unless I set
the PERL_PROFILE_FILENAME to the absolute path of the file that I wanted.
Anyway, it seems that I wasn't really comparing apples to apples. One of
the things the script has to do is get some data from files that may are
may not be zipped up. Most of the time is being taken up by calling the
Compress::Zlib routines. It turns out the directory with 625 entries has
437 zipped files, while the one with 1125 entries only had 127 zipped
files.
Since curiosity killed the cat, I moved the data on the macs to the Xeon
and ran with profile. So, with identical data and perl scripts I get:
Mac: 87.8 seconds, with 30 seconds in Compress and 30 sec in <other>
Xeon: 64 seonds, with 15 seconds in Compress and 35 sec in <other>
Anyone have any insight into what other is? I 'm assuming that these are
the system calls to gridware.
Thanks,
Brett Grant
Sherm Pendley <sherm@dot-app.org>
02/27/2007 09:45 AM
To
Brett_W_Grant@raytheon.com
cc
macosx@perl.org
Subject
Re: perl code on mac slow
> I have a server where the computer that I log into is a Mac Xserver
> 2.2
[quoted text clipped - 24 lines]
> Is there something I can check on to see what is going on? Its almost
> like the mac doesn't use all of its resources when it runs the code.
Mac OS X doesn't throttle processes that I know of, so if your CPU is
at 90% idle, your script is probably waiting on either disk or
network IO. You could try profiling your script with Devel::DProf to
get a breakdown on where the time is being spent in your script.
Another very simple benchmark is to run your script with "time
myscript.pl". That will report the real (i.e. wall clock) time spent,
the user (i.e. your script) time, and the sys (i.e. OS) time. Time
spent waiting on disk or network is reported as sys time here.
sherm--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net