1

When I set up a fresh Ubuntu Server installation in expert mode after the partitioning comes a point where you have to select the linux kernel. There are shown about 5 options like linux-generic, linux-image-... and others. The standard selection is linux-generic but I don't exactly know which one to select.

Can someone explain which kernel to use and why? What does this generally effect? What are the differences between the kernel? What does kernel mean?

0

The following applies to MAAS https://docs.maas.io/2.1/en/installconfig-nodes-ubuntu-kernels

which lists

  1. general
  2. hardware enablement kernels (where an 18.04 LTS will upgrade and use the 18.10 kernel in time, then 19.04, then 19.10, then finally 20.04 which can be useful for very modern hardware) low
  3. low latency kernels (see following)

More kernel options can be seen via https://help.ubuntu.com/community/UbuntuStudio/RealTimeKernel

Kernel Types

-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.

-rt kernel - is based on the Ubuntu kernel source tree with Ingo Molnar maintained PREEMPT_RT patch applied to it. Also known as a hard 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 known as a soft real-time kernel.

-realtime kernel - is based on the vanilla kernel source tree with Ingo Molnar maintained PREEMPT_RT patch applied to it. Also known as a hard real-time kernel.

Kernel Confusion

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.

I listed MAAS as I'm sure will be 3 of the 5 you were offered, I don't recall what the 5 options you mentioned were, but the other reference covers low latency

--

I'll provide links for HWE or Hardware Enablement Stack. Using HWE gets you the latest kernel (with more features & kernel modules [drivers]) useful for the latest hardware but not without the [tiny?] loss of stability (primarily they are tested less , esp. in production)

https://wiki.ubuntu.com/Kernel/LTSEnablementStack https://wiki.ubuntu.com/Kernel/RollingLTSEnablementStack

In the end it's your choice (you know your hardware, end-use, etc best); but for I'd guess 90+% of us it's the generic kernel.

| improve this answer | |
  • Thanks a lot. So I would choose the stock linux-generic kernel. As I understood it now the other versions are for performance optimizations of the ubuntu system. At the moment this is too scientific and not needed for a standard installation. – dfk1976 Jan 20 '19 at 14:05
  • Only you know your hardware, and end purposes and thus have to decide. HWE allows you to get later kernels, which reduce stability a fraction [newer with less testing] in order to use the latest so you get wireless or newer drivers & features that were missing because you have newer hardware that needs it. Refer wiki.ubuntu.com/Kernel/LTSEnablementStack for more details. If you're happy with the answer, you can accept it (unless you get a better answer), but yes for 90+% of use generic kernels – guiverc Jan 20 '19 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.