[lkml]   [2009]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Default HZ value for X86

On Mon, 2009-04-27 at 16:34 -0700, Alan Cox wrote:
> On Mon, 27 Apr 2009 16:07:10 -0700
> Alok Kataria <> wrote:
> > Hi,
> >
> > I was wondering why do we still have the default HZ value as 1000 for
> > the x86 kernels.
> >
> > arch/x86/configs/i386_defconfig:CONFIG_HZ=1000
> > arch/x86/configs/x86_64_defconfig:CONFIG_HZ=1000
> >
> > With the highres timer implementation it was planned to move away from
> > relying on high timer interrupt frequency for applications requiring
> > precise high resolution timers.
> With the tickless kernel does this really matter any more ?

Agreed that with tickless it won't be an issue anymore when the system
is idle, but when the system is loaded the interrupts will still fire at
HZ frequency.
I ran a simple tight loop to check what kind of effect would the HZ
value have on system performance. This tight loop was run on a 2.6.29
kernel running under VMware looping till count of 6X10^9.
The one with HZ = 1000 took about 4m 24s, (264sec)
Total timer interrupts = 264405

And the one with HZ = 100 took about 4m 15s (255sec)
Total timer interrupts = 25593.

Please note that the system was booted in a single user mode and only
the minimal services were running to reduce any interference from any
other process. These numbers are averaged across 3 runs.

The cost of servicing an interrupt would be a little higher in the
virtualized environment, so I am not sure if it would have a similar
impact on a real hardware.
So this mail is more to understand if there could be any real downsides
with reducing the Hz value, FWIU it shouldn't affect the correctness of
the system right ?

> We might as
> well keep a logical 1000 for convenience and accuracy.

What is the accuracy factor that you are mentioning here ? i guess you
mean the precision of the timeouts, but that shouldn't matter much
right ?

> Alan

 \ /
  Last update: 2009-04-28 18:59    [W:0.055 / U:3.496 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site