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

Riley Williams (rhw@bigfoot.com)
Sun, 3 Jan 1999 21:17:55 +0000 (GMT)


Hi Albert.

On Sun, 3 Jan 1999, Albert D. Cahalan wrote:

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

I'm not sure what the advantages are, but I've seen systems running
using values of 75, 150 and 512 as well - not long enough to study
them, so it wouldnae be safe for me to comment thereon...

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

Best wishes from Riley.

---
 * ftp://ps.cus.umist.ac.uk/pub/rhw/Linux
 * http://ps.cus.umist.ac.uk/~rhw/kernel.versions.html

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