Re: Can and should the kernel HZ value be changed?

Albert D. Cahalan (acahalan@cs.uml.edu)
Sun, 3 Jan 1999 06:39:18 -0500 (EST)


Steve Bergman writes:

> The default value of HZ is 100hz. Since the DEF_PRIORITY in sched.h
> is 20, that means a processor intensive process gets a maximum of
> 200ms or 1/5th of a second. Two intensive processes can hog the
> processor for 0.4 seconds and so on. That's a long time when one
> is running multimedia apps, games, or burning a CD. I presume that
> there are good reasons to keep HZ at it's present value, but I'd like
> to find out more about it. Can anyone point me to more information or
> perhaps a previous discussion of this subject?

Perhaps you noticed the slashdot.org posters reporting greatly
improved responsiveness?

You can and should change HZ, but might cause trouble. If you set
the value to 1024 (like the Alpha uses) your clock rolls over in
about 50 days. Maybe you reboot every month and do not care.

Procps (ps, top, w, etc.) will break. You can recompile it,
or you can get a new version that ought to tolerate HZ changes.
http://www.cs.uml.edu/~acahalan/linux/procps-990103.tar.gz

Allowed HZ values are: 50 60 100 128 256 1000 1024
Let me know if you need another.

Oh, "top" CPU usage display is somewhat fixed too.

-
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/