kernel - central component of a computer's operating system, bridging between applications and the actual data processing done at the hardware level. See also Wikipedia's Kernel entry.
real-time - an attempt to have deterministic operational deadlines from an event to system response, i.e. the time it takes the computer to respond to an event is known and predictable. A byproduct of this is usually lower latency for audio. See also Wikipedia's Real-time entry.
vanilla kernel source - Linux kernel source code than you can download at www.kernel.org.
Ubuntu kernel source - Linux kernel source code used in Ubuntu and modified for offer all Ubuntu features. You can download it at http://kernel.ubuntu.com/git or simply install binary releases via Synaptic.
-generic kernel - this is the stock kernel that is provided by default in Ubuntu.
-preempt kernel - this kernel is based on the -generic kernel source tree but is built with different configurations (settings) to reduce latency. Also known as a soft real-time kernel.
-lowlatency kernel - very similar to the -preempt kernel and based on the -generic kernel source tree, but uses a more aggressive configuration to further reduce latency. Also know as a soft real-time kernel.
At the moment only the first three kernels are available through official Ubuntu archives.
Choosing a Kernel for Your Use Case
These are some simple guidelines provided to help you understand which kernel, and in which order, you should test to fit your use case.
- If you do not require low latency for your system then please use the -generic kernel.
- If you need a low latency system (e.g. for recording audio) then please use the -preempt kernel as a first choice. This reduces latency but doesn't sacrifice power saving features. It is available only for 64 bit systems (also called amd64).
- If the -preempt kernel does not provide enough low latency for your needs (or you have an 32 bit system) then you should try the -lowlatency kernel.
- If the -lowlatency kernel isn't enough then you should try the -rt kernel
- If the -rt kernel isn't enough stable for you then you should try the -realtime kernel
Currently, not all kernels are available in the official Ubuntu repositories. The balance may be found in select PPA's.
First attempt to locate the desired kernel in the official Ubuntu repositories by using your choice of package management (i.e. Synaptic or apt-get). Warning - the -rt kernel release can lag behind mainstream, check to the kernel version number! As of this writing, Lucid release, the kernel is 2.6.32 but the -rt kernel available in the Ubuntu repositories is 2.6.31.
Next it is recommended you search in the following selective and discriminating PPAs:
Alessio Igor Bogani's PPA - https://launchpad.net/~abogani/+archive/ppa
Ubuntu Studio Developer's PPA - https://launchpad.net/~ubuntustudio-dev/+archive/ppa
It is not recommended to use kernels from unknown or untested PPA's! You do not know what configuration were used or how it was built and an unstable (or unbootable) system could be the result. Use only trusted PPA's
Please note that Alessio Igor Bogani has been the Ubuntu Studio kernel maintainer for several releases and has the support of the Ubuntu Studio team.
Some confusion persists about the purposes of -lowlatency and -realtime kernels.
The goal of -realtime and -rt (hard real-time) kernels is to achieve the lowest possible latency at every cost. In technical slang "hard realtime systems should always meet their deadlines". Thus developers should use the most advanced programming techniques (sleeping spinlocks, PI Mutex, Full preemption, IRQ Threads and others) and sacrifice things like reliability, power-saving and throughput. Almost all parts of kernel should be analysed to guarantee that right behaviour always occurs.
The goal of -preempt and -lowlatency (soft real-time) kernels is to achieve good realtime characteristics, meanwhile offering welcomed features like rock-solid reliability, good power-saving features and also good throughput. But in this way it can't guarantee lowest latency under all conditions.