Re: Stopping CPU Hogs...

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Thu, 5 Nov 1998 16:06:53 +0100 (CET)


On Wed, 4 Nov 1998, Kevin Grey wrote:
> On Wed, 4 Nov 1998, John Fulmer wrote:

> > Is there a way to keep a process from hogging 100% cpu usage? One thing
> > that has always bugged me is that a process (oh like, hmmmm, NETSCAPE!)
> > can grap 100% cpu for a period of time (usually seconds) and grind the
> > system to a halt for that period. I'm familiar with niceness levels, but
> > it seems that an ill-behaved process can still jerk the system to a halt
> > for a few seconds.
> >
> > Is there a way to say that any one process or thread can only allocate
> > x% of the total cpu usage? I would think that a governor of some sort
> > make make linux, especially as a desktop, perform much smoother.

There are no hard-limit schedulers that I know off,
but they probably wouldn't be the right solution
anyway.

> I believe you're looking for the program 'nice'

He said he wasn't, and he probably isn't. John might
be interested in my scheduler patch, however. My
patch does a lot of things, one of those is favoring
interactive processes a lot. This is equal to penalizing
continously running processes. With my patch, the system
can remain responsive (under X) with loads of up to 20,
after that it starts to feel a bit sluggish, but still
usable up to a load of about 50. The program used was
a simple "int main(void) { while (1); }"...

have fun,

Rik -- typing slowly because my kbd is dvorak since sun 19:40...
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/