On Sun, 7 May 2006, Jure Varlec wrote: > What exactly does 'Timer frequency' (under 'Processor type and features') do? > Which timer does it control? I'm asking because it seems to have interesting > effects. > > I used to have it set to 1KHz. Yesterday, I tried setting it to 100Hz just to > see what effects it would have. I didn't notice any impact on responsiveness. > There is a funny effect with superkaramba though. I noticed it with the > system monitor first, but I added a clock to see it better. I set the refresh > interval for the clock to 1 sec, and everytime it refreshes, it seems to > 'skip a beat'. Hard to describe it. When it refreshes to show the current > number of seconds, it refreshes again a not-sot-tiny fraction of a second > later and shows the next second. Then, it fails to refresh for almost 2 sec, > then does it again. > It seems funny because 100Hz frequency is low enough for a human to observe > (or not, depending on what you're observing) but too high to cause such > behavior. That means I misunderstand what this setting does, so I'm turning > to you for an answer. >
I found a good "about the timer frequency" at http://lwn.net/Articles/114991/ "Boot-time clock frequency selection The timer interrupt is the kernel's way of keeping track of the passage of time. Every so often, a programmable timer interrupts the kernel, which responds by updating its internal time value, performing various housekeeping tasks, and executing any delayed kernel work whose time has come. In the 2.6 kernel, on the x86 architecture, by default, the timer interrupt comes 1000 times per second; other architectures and configurations can vary. Playing with the timer tick frequency is almost as old as the kernel itself. The frequency with which the hardware timer interrupts the processor is well parameterized into a single compile-time variable (HZ); running the system with a nonstandard clock frequency is simply a matter of changing the definition of HZ (within reasonable bounds) and building a new kernel. There are legitimate reasons for playing with the timer frequency. A faster clock can allow the system to perform more precise delays, and to respond to events more quickly. Systems running at a higher clock frequency should have lower latencies in many situations. There is an overhead associated with the timer interrupt, however; a higher-frequency interrupt will take more CPU time. So, for server loads (where latency is less important), the overhead of a higher timer frequency is not worth it. On laptops, the default 1KHz timer can also defeat the CPU's power management features and significantly reduce battery life. In other words, there is no single value for the timer frequency which works for all users. Changing the frequency is still relatively hard, however; some people are more comfortable with building new kernels than others. Wouldn't it be nice if the frequency could be made into a boot-time parameter, so that it could be changed from one boot to the next without a kernel rebuild? " I have noticed a big difference between 1000HZ and 100HZ on a system running in VMware. The clock will often end up being much slower than the real time clock just because VMware can't deal with the overhead (100HZ being the fix). -- [email protected] mailing list

