Customised Linux kernels: advantages and disadvantages

3 min read

For many years, experienced system administrators often manually customised the kernel to improve the performance, security and flexibility of Linux-based servers. However, advances in technology and hosting services mean that kernel customisation is no longer as important as it once was. In this post, we’ll examine what a customised kernel is, and what its advantages and disadvantages are.

What is a customised kernel?

The kernel is the part of the operating system that bridges the gap between the hardware and the software, and manages the system’s resources. A customised kernel is one that has been reconfigured for specific purposes, such as enabling or disabling features, or optimising performance, security or compatibility.

Nowadays, most providers offer operating systems with kernels pre-optimised for general use; however, businesses operating VPS, dedicated or bare-metal servers still have the option to customise them.

Why is it worth customising the kernel?

Despite technological advances, there are still practical reasons to customise the kernel, particularly in specialised or high-demand environments. Customisation can, for example, improve performance by removing unnecessary drivers, protocols or subsystems, thereby making the kernel more efficient. This can speed up system boot times and improve response times, particularly when system resources are limited.

A customised kernel can also improve security. Disabling unnecessary components reduces the risk of cyber-attacks, whilst enabling advanced security features makes systems more resilient to threats. Similarly, by providing greater control over the system, customisation can help businesses operating in strictly regulated industries to comply with regulatory requirements.

Customisation can also increase flexibility, allowing system administrators to enable or disable experimental features and integrate hardware-specific modules.

The challenges of customised kernels

Although they may offer advantages, customised kernels are more complicated to manage. Whilst standard kernels can be updated and patched by managed hosting providers, customised kernels must be maintained manually. Administrators must install security patches and manually recompile the customisations after updates. They must also test any new or updated configurations before putting them into production.

A custom kernel can improve compatibility with some older systems, but configuration changes may conflict with other software, such as the cPanel or Plesk control panels, as well as in-house applications and drivers. Incorrect configuration may prevent the system from booting and cause it to crash.

Businesses wishing to use a custom kernel and manage it in the future will need significant in-house expertise. IT teams must be familiar with the Linux kernel architecture, know how to work with configuration files, manage dependencies and troubleshoot problems.

Modern alternatives to customised kernels

Thanks to advances in technology and hosting services, there is now far less need to customise the kernel. For example, certain operating systems, such as CloudLinux and AlmaLinux, now feature built-in tools that enable system administrators to fine-tune performance, improve isolation and enhance security more easily.

Today, users of the standard kernel can update it with live patches, which eliminates the need to restart the server and thus improves availability. As a customised kernel must be recompiled and tested before being put into production, this makes customisation far less attractive for companies where high availability of critical applications is essential.

Technologies such as containerisation and virtualisation have also reduced the importance of customisation. Containerisation tools such as Docker and Kubernetes isolate workloads at the application or virtual machine level, thereby reducing the need for customisation, whilst many cloud-based operating systems are now immutable and not designed to be modified.

When does customisation still make sense?

Although modern solutions have in many cases made customisation unnecessary, there are still instances where it can be beneficial. For example, companies developing hardware devices or embedded systems may need to optimise the kernel for specific chipsets or devices.

Customising the kernel can be beneficial for improving scheduling, interrupt handling and file system performance in environments where high-performance computing is required, such as in scientific research, artificial intelligence modelling or real-time data analysis. Furthermore, for businesses with specific compliance requirements or organisations operating in air-gapped environments, customisation may be necessary to ensure full control over the kernel. This may be required for auditing or accreditation purposes.

Back to the blog