Re: [perf-discuss] Poor Solaris 10 performance

2009-09-17 Thread Raymond Wong
Hi Guys, Thanks for the tips. I understand now that a simple comparison as I did wasn't accurate. And I managed to reduce the script's runtime from around 20 minutes to about 4 seconds just by following your 2 tips. Awesome! Thanks again & keep up the good work. -- This message posted from op

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-12 Thread Jens Elkner
On Thu, Sep 10, 2009 at 07:01:47PM +0200, Roland Mainz wrote: ... > ... and http://www.opensolaris.org/os/project/shell/shellstyle/#math has Really nice compilation! RFE: Many users are unaware of ksh subshell patterns as described in http://oreilly.com/catalog/korn2/chapter/ch04.html#ksh2-ch-4-t

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-10 Thread Roland Mainz
Phil Harman wrote: > Roland Mainz wrote: > > Peter Tribble wrote: > >> On Thu, Sep 10, 2009 at 8:38 AM, Raymond Wong wrote: > >> > > [snip] > > > >> while read a > >> do > >>line=$(($line+1)) > >> done > > > > This will run even faster if you remove the '$', put the assignment > > inside th

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-10 Thread Phil Harman
Whilst true, it pales compared to the inefficiency of executing external commands. I've always preferred the (( a = a + 1 )) construct because it is slightly more readable. Nice to know that there's a performance reason for doing it too. Thanks for sharing. Phil Roland Mainz wrote: Peter Tr

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-10 Thread Roland Mainz
Peter Tribble wrote: > On Thu, Sep 10, 2009 at 8:38 AM, Raymond Wong wrote: [snip] > while read a > do >line=$(($line+1)) > done This will run even faster if you remove the '$', put the assignment inside the arithmetric expression and declare "line" as integer variable, e.g. ... -- snip --

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-10 Thread Bob Friesenhahn
On Thu, 10 Sep 2009, Phil Harman wrote: But this may just sound like sour grapes. The sad reality is that Linux is often better at running bad code well, whereas Solaris doesn't suffer fools gladly. Solaris's fork/exec is much slower than Linux or NetBSD/FreeBSD. BASH is also what I like to

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-10 Thread Phil Harman
Peter Tribble wrote: On Thu, Sep 10, 2009 at 8:38 AM, Raymond Wong wrote: Hi, Thanks for taking a look. The SPARC system is a Sun V440 with 4 CPUs and 16GB of RAM. The normal CPU load is about 50% and minimal disk activity. What the script does is to go through a text file and get the beg

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-10 Thread Peter Tribble
On Thu, Sep 10, 2009 at 8:38 AM, Raymond Wong wrote: > Hi, > > Thanks for taking a look. > > The SPARC system is a Sun V440 with 4 CPUs and 16GB of RAM. The normal CPU > load is about 50% and minimal disk activity. > > What the script does is to go through a text file and get the beginning & > en

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-10 Thread Khyron
*sigh* http://blogs.sun.com/timc/entry/the_seduction_of_single_threaded Even though you're only using US-IIIi CPUs, the same issue applies here. You're running a single threaded workload on 4 CPUs which are better at multithreaded workloads (US-IIIi) and comparing it to running a single threaded

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-10 Thread Raymond Wong
Hi, Thanks for taking a look. The SPARC system is a Sun V440 with 4 CPUs and 16GB of RAM. The normal CPU load is about 50% and minimal disk activity. What the script does is to go through a text file and get the beginning & ending line # for printing the pages specified. The part of the script

Re: [perf-discuss] Poor Solaris 10 performance

2009-09-10 Thread Phil Harman
Can you be more specific about the SPARC system? Can you share some or all of the script with us? Maybe you could tell us a little more about what it does? On 10 Sep 2009, at 07:40, Raymond Wong wrote: Hi, I am experiencing poor performance on our Solaris 10 installation. The bash scri

[perf-discuss] Poor Solaris 10 performance

2009-09-09 Thread Raymond Wong
Hi, I am experiencing poor performance on our Solaris 10 installation. The bash script that I wrote took more than 20 minutes to complete on the Solaris instance, while the exact same script only take 45 seconds on an intel-linux installation. Though the Intel CPU is running at 2.8GH & the Spa