Sunny Days – Day 6

Most of my time today was occupied with other work, so I didn’t find a lot of room to play with the T2000. Since the major task of the other work was to install a lot of operating systems I could use the waiting periods to test some ideas that came to me after I finished installing PHP.

The Power of Parallelism
One thing that occured to me was that during all the compilation stuff I’d done, I completely failed to make good use of the 24 CPUs in my T2000. So it would be nice to see whether they could be put to work a little. Because of the time constraints, I chose a basic test with the tools already available: the gcc compiler and the PHP source code.

As you might know, you can instruct gmake to use more than one task with the -j option when compiling stuff. I completely forgot about that when installing PHP so what I did was to redo the compilation runs. Only this time with different settings for the -j option. Since my T2000 sports 24 CPUs I thought it could be interesting so see whether I could find a break-off point. Thus I instructed the script I had hacked up to start at one and go up to 32 (no it doesn’t go up to just eleven) parallel tasks:

#!/bin/bash
for runs in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32; do
gmake clean > /dev/null
echo “Tasks: $runs”
echo “Tasks: $runs” >> ../phpruns.list
/usr/local/bin/time -p -o ../phpruns.list -a gmake -j $runs > /dev/null
done

Don’t copy and paste right now! It won’t work for you! The reason can be found in line 6. Instead of using the built-in time command I used GNU time – mainly because it allowed me to directly write to a file of my choosing without having to play with redirects (which I really, really hate). So if you want to use and even adapt the script, get GNU time first, compile and install. By now you should know how to do that. If copied as given the script has to be started in the root directory of the sources you intend to compile. On each run, the gmake clean makes sure that all the already compiles binaries from the previous run are deleted. Feel free to adapt and improve.

The Results
The results were impressive. Look at the chart and decide for yourself:

Time spent compiling PHP using a different number of parallel tasks on the Sun Fire T2000

If you want the results file, get either the Exel version or the one in Open Document Format.

Explanation: The X-axis lists the number of parallel tasks started by make, the Y-axis gives the time in seconds. The blue line marks the real time it took to compile the whole PHP source code. The green line represents the CPU time spent in user mode. This may well be more than the real time it took. That’ll happen when some of the work is offloaded to other CPUs. Finally the red line indicates the CPU time spent in kernel mode.

So, on my Sun Fire T2000 after 21 parallel tasks there’s nothing much to be gained. Would be interesting to see the results of owners with machines with more and less CPUs. Sure, this is not a really scientific approach but it nevertheless gives a good impression of how well the system scales. Thanks to Solaris 10 not caching disk data as agressively as is done by Linux, disk I/O influence should be roughly the same for all the test runs. Thus, the only real differentiator is the CPU horse power applied to the problem and the ability of the system to run multiple tasks with as little overhead as possible. In both areas the T2000 did really well. Even when gmake started more tasks than CPUs available the processing overhead didn’t increase the turn-around time noticeably. What can’t be seen in the graph is that compile times slightly increase after 23 parallel tasks. But ever so slightly that a user won’t even notice. What I like is that user time stays almost the same. The increase in system time even after the “optimum” of 23 parallel tasks in my opinion is caused by rescheduling overheads. All in all I like the results of that test for they show the Sun Fire T2000 to be a quite robust platform using a kernel with good scheduling qualities.

Lessons learned

  • Some minutes of reflection can save you a lot of time.
  • There’s nothing to replace CPU power than more CPUs ;)
  • Overdoing it a bit won’t harm – at least not the T2000.
  • PHP *does* produce a lot of warnings.
  • [ All posts about my experiences with the SunFire T2000 >>> ]

    This entry was posted in Hardware, Misc. Bookmark the permalink.

    3 Responses to Sunny Days – Day 6

    1. Ingo says:

      Is there any special reason why the word “Eleven” is linked to the homepage of the gnu time command?

      Anyway – do you have the result file handy for download? I really like to compare this with some other machines (2xUltraIIIi, 2xUltraIII, 4xUltraIIIi, 8xUltraIII)

      Regards,
      Ingo

    2. Yep, the reason for the wrong link is that I pasted from the wrong buffer ;) Fixed now but I fear that won’t give you any more clues. As for the result file: have a look below the graph.

    3. Ingo says:

      Thanks for the pointers to the somewhat hidden links in the text. I now did the tests on V240 and V440 and found out, that they both compile much faster and reach their limit if numer of parallel tasks is the same as the number of really installed processors. No big thing to wonder about.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>