wls@astrovax.UUCP (William L. Sebok) (10/15/84)
> > We have started to notice a problem with some > > people's login csh being reniced. Since we always > > have a few processes running, these people's terminal > > appears to be dead. > > > > By reniceing the csh to 0, the terminal becomes alive > > again, and renice reports the old priority as 19. > > > > Is there some thing in 4.1 bsd that renices people when > > the system load gets too high? > > In 4.2BSD, > .... if a process accumulates enough CPU time, the system decides it's had > enough favorable treatment and it's time to get tough with it. I seem to > remember something like this also being in 4.1BSD, so that's what may be > happening. > Guy Harris Although at nice 19 I rather doubt that this is what is going on. The automatic reniceing behavior of the kernel is something of which I strongly approve. Astrovax has often has a large component of long-running background jobs. Because I was convinced that a large number of nice +4 jobs was still affecting interactive response I changed the automatic renice to +8. The algorithm in a pseudo-C is: if ( (over 10 cpu minutes) && (uid != 0) && (niceness >= 0) && (niceness < 6) ) niceness = 8; In other words if the niceness is positive and less than 6 it is reset to 8. The gap between 6 and 8 is to encourage people to nice their background jobs at the very beginning by giving a two point penalty if they forget. The exemption for processes of negative niceness is a not-very-satisfactory sop for the people here doing image-processing. These are jobs that are mostly interactive but can use a large amount of cpu time. A more satisfactory algorithm I would like to implement would involve terminal idle time. If someone could give me some pointers how to do this in the kernel without too much overhead I would appreciate it. Admittedly I haven't really done my homework yet to see if it would be feasable. -- Bill Sebok Princeton University, Astrophysics {allegra,akgua,burl,cbosgd,decvax,ihnp4,noao,princeton,vax135}!astrovax!wls