In short: the kernel frequency is the number of interrupts (IRQs) handled by the kernel per second. Like most applications of frequency, it's also expressed at Hz (hertz).
A more sound explanation of interrupts can be found here, but it basically boils down to this: an interrupt is generated each time an event on a piece of hardware (in the most elementary way; this includes your keyboard for instance), and requires the necessary CPU time to handle that event. This is called interrupt handling.
Now, because the kernel directly interacts with all the hardware around, it's vital to have it handle interrupts; actually, it's the kernel that handles interrupts, by using the CPU.
Very simple: the more times the kernel can handle an interrupt, the more events may be processed. As a result, the more events (thus interrupts) are processed, the more responsiveness the system gets: the system (and kernel) can react faster to events, which is important on let's say the average desktop system.
There's however a big fat warning to it, because handling events (and interrupts) does require CPU time. The more interrupt handling occurs, the less time there is for handling user-space applications. On the other side, the less interrupt handling occurs, there would be more time for user-space applications, but the system would become less responsive. The endgame is getting a good balance, allowing more time for interrupt handling, without losing too much time for user-space applications. For this, we can set the kernel frequency.
Whereas other operating systems usually have it fixed, the linux kernel provides an easy way to change this to your needs.
Well, it's luckily not that difficult. The thumb rule is that usually for desktop systems, the kernel frequency is set higher, because one would require a more responsive systems (in particular for internet, and of course, for gaming). For server systems, the kernel frequency would be a bit lower, because there's more need of much CPU time for those own applications; a responsive system in the way of a desktop is surely not required here.
In the linux kernel, there are currently (at time of writing, 2.6.15) three options available:
The best choices are usually 250hz for average servers, and 1000hz for desktops. One could deviate of course, but these are the recommendations from the kernel developers.
When using, make menuconfig, you'll find it at Processor types and features. The option says Timer Frequency.
In the config file itself, the option's called: CONFIG_HZ.
« ‹ | November 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |