July 13, 2005

Linux: Changing The Default Hertz

A recent discussion on the lkml debated the merits of modifying the default hertz of the Linux kernel. The default hertz of the 2.4 kernel is 100 Hz, while the default hertz of the 2.6 kernel is currently 1000 Hz. In Andrew Morton [interview]'s plans for 2.6.13 [story] he lists a patch tagged with the comment, "changes default HZ to 250, make HZ Kconfigurable". As to why 250Hz was chosen, Linus explained in an email from May of 2004, "1kHz is also good in that it makes it easy to convert both to USER_HZ and to ms/ns. But maybe something like 250Hz would be better - still high enough that things like multimedia (which really wants higher frequencies in order to be able to sleep for fractional video-frames) should be happy, low enough that we use less CPU."

Link: kerneltrap.org


  • Linux
Click Here!