[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

OT: nice'ing jobs



Sorry for the off-topic post, but I'd like to draw on the general
computing expertise of this group.

Where I work, we have a unix server with 4 CPU's.  There is not a "nice"
police at our center, and I have been trying to make the case to the
sysadmin that there should be.  Could someone please review my brief
argument and tell me if I am incorrect in my thinking?  Here's an
example...

Here is some truncated ps output:

    USER   PID %CPU %MEM    STIME NI COMM
   user1 2573 24.6  0.3 10:52:45 20 EMMIX
   user1  1067 24.3  1.0 09:33:22 20 EMMIX
   user1  2636 24.1  0.9 10:58:42 20 EMMIX
   user2  7153 20.4  0.2 17:35:39 20 SPSS

The first three jobs are CPU-intensive and will run for about 24 hours. 
The fourth job is I/O intensive and will run for maybe 2 hours.  Since
there are four processors, at this point the jobs are not going to
interfere with each other.  However, if one more CPU-intensive job were
added by user1, all jobs would be slowed proportionately.  My argument
is that nice'ing the CPU-intensive jobs would cause the I/O-intensive
job to run faster without slowing the CPU-jobs at all.  The reason is
that the I/O-intensive job doesn't use much CPU-time.  So when it gets
its turn on the CPU it doesn't use all of its allotted time.  However,
it still has to wait an equal amount of time to get its turn at the CPU
again.

Generally speaking, is this correct in theory?  It seems especially
considerate to nice the CPU-intensive jobs, since that user gets more
aggregate CPU time anyway since they're running multiple big jobs.

Thanks,
Brian

-- 

Brian J. Stults
Doctoral Candidate
Department of Sociology
University at Albany - SUNY
Phone: (518) 442-4652  Fax: (518) 442-4936
Web: http://www.albany.edu/~bs7452



Reply to: