What is HZ Value ?

The HZ value refers to the frequency at which the kernel's internal timer interrupt occurs. Here, Linux programs a timer chip (PIT on x86), to sets up a timer interrupt to trigger  once for every millisecond. It influences various time-based operations in the system.

The HZ value is typically determined as the number of timer interrupts per second. For example, if want to fire timer interrupt for every 10ms, then configure HZ value to 100,  ie 1000/100 = 10ms  

The value of HZ is basically a function of processor architecture and kernel version.

The HZ value affects several aspects of the system, including process scheduling, timekeeping accuracy, and timer-based operations.

In recent versions of the Linux kernel, the HZ value has been replaced by the concept of "tickless" or dynamic ticks. Tickless kernels dynamically adjust the timer interrupt frequency based on the workload and system activity to achieve better power efficiency and responsiveness.


Previous Post Next Post

Contact Form