RE: Why HZ on i386 is 100 ?

From: Richard B. Johnson (
Date: Tue Apr 16 2002 - 07:42:28 EST

On Tue, 16 Apr 2002, BALBIR SINGH wrote:

> I remember seeing somewhere unix system VII used to have HZ set to 60
> for the machines built in the 70's. I wonder if todays pentium iiis and ivs
> should still use HZ of 100, though their internal clock is in GHz.

A different clock goes to the timer chip. It is always:

        CLOCK_TICK_RATE 1193180 Hz
unless an Elan SC-520 at which time the frequency is:
        CLOCK_TICK_RATE 1189200 Hz

(from ../include/asm/timex.h)

> I think somethings in the kernel may be tuned for the value of HZ, these
> things would be arch specific.
> Increasing the HZ on your system should change the scheduling behaviour,
> it could lead to more aggresive scheduling and could affect the
> behaviour of the VM subsystem if scheduling happens more frequently. I am
> just guessing, I do not know.

It doesn't/can't change scheduling behavior. It changes only the rate
at which a CPU bound task will get the CPU taken away. It also changes
the rate it which it gets it back, in a 1:1 ratio, with a net effect
of nothing-gained/nothing-lost except for preemption overhead.

> Changing though trivial would require a good look at all the code that
> uses HZ.

The reference to HZ seems to be correct in all the headers so changing
it is trivial.

Dick Johnson

Penguin : Linux version 2.4.18 on an i686 machine (797.90 BogoMips).

                 Windows-2000/Professional isn't.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:14 EST