I run Mlucas on several Sparcs under Solaris at work,
and I've noticed something not so nice about the Solaris
nice command. The lowest priority Solaris allows is 19,
which on any other Unix-like OS I've used would mean the
job in question only gets CPU cycles if no high-priority
processes are running. However, under Solaris, something
run at priority 19 still tends to get a 
not-insignificant share of CPU time - a typical number
is 15% on a system with one other full-priority job 
running. This has caused me to have to restrict my GIMPS
work to only our least-used (read: slowest) Sparcs,
since people running actual work-related jobs don't
want to be slowed down by a recreational-math program.

So here's my question: does anyone know of a solution
to the above conundrum? The first thing that came to my
mind was to run the code as a cron job, but's that's not
optimal since folks here tend to run jobs at any and all
hours, often overnight.

What I'm thinking of is inspired by the output of the
top utility - this lists (among other things) the
average job load of a system, and also what % of the
CPU time each active process is getting. (Since top is
available for Sparc Linux, that means source code is
available.) Would it be possible to write a script to
basically emulate the OS's process scheduler, but which
is used to control just one application? What I'd like
this personal scheduler to do is the following:

1) Every few seconds get the average system load, in
terms of how many CPUs would be required to run every
active process at full speed;

2) If the load exceeds the available number of CPUs,
suspend the user program, but keep everything in main
memory; otherwise, keep running.

Any such scheme, in order to be practical, would have
to be executable without superuser privileges.

Thanks,
-Ernst

_________________________________________________________________________
Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm
Mersenne Prime FAQ      -- http://www.tasam.com/~lrwiman/FAQ-mers

Reply via email to