On Thu, 27 Nov 2008 13:47, Norman Ramsey wrote:
> I wonder if anybody on this list has come up with any good tricks
> for exploiting parallelism using ksh.  Example: all the unit and system
> tests I run on the code my students submit for homework are written using
> ksh.  Given that I have a four-processor machine, wouldn't it be
> nice to get through those tests four times faster?  But I'm not sure
> I want to blithely launch as many processes as I have tests.
>
> Some form of work-crew parallelism would be ideal here.
> The shortest path I have thought of would be to have ksh generate a
> makefile that says what I want to have done, then use make to
> limit the amount of parallelism going on at once.  (For example, I might
> want to tie up just 3 of my 4 cores running tests.)
>
> This procedure strikes me as a bit tedious.  Does anybody have other
> ideas?
>

I can't see CPU being the limiting factor here; more likely I/O if the 
scripts are doing the usual business of typical shell scripts rather than a 
lot of string and/or maths business without much I/O.

If that was the case, I'd be aiming to keep my disk queues nearly occupied 
without having too many requests stacked up; such a measure is far more 
nebulous. Some sar option shows the length of the physical disk queues and 
wait time averages to service it, but I can't remember.

The buffers will also have some serious effect on the best balance too.

All in all, I doubt there's a 1:1 correspondence between CPUs and optimum 
number of test instances, although I don't mind being proven wrong!


_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to