Multikernel, an excellent utility for running multiple kernels without virtualization

Key points:
  • Multikernel Linux allows running independent kernels simultaneously on bare metal.
  • Based on the Linux 7.0 kernel, it uses CONFIG_MULTIKERNEL and currently supports x86_64 architecture.
  • It eliminates the overhead of virtualization (KVM hypervisors), achieving context switches 2,5 times faster.
  • Unlike containers, instances do not share the kernel, preventing failures or vulnerabilities from affecting the entire server.
  • Use the Kerf tool along with the Lazy CMA and DAXFS modules to dynamically manage resources and boot Docker images.

Multikernel Linux

Last year we discussed here on the blog a proposal from ByteDance (creator of TikTok) for a utility called Parker (PARTitioned KERnel), an experimental technology that allows multiple Linux kernels to run simultaneously. And now, a little over a year and a half later, a new public utility from the project, "Multikernel Linux (mklinux-v7.0-mk2)," has been released.

This development introduces a specialized variant of the Linux kernel that enables the simultaneous execution of multiple independent kernel instances within a single physical server. By operating directly on the bare metal, this technology completely eliminates the need for hypervisors or virtualization layers, granting each instance direct access to allocated memory, CPU, and devices.

ByteDance-Parker-multikernel
Related article:
Parker: The new technology that allows running multiple Linux kernels without virtualization

Based on the recently released Linux 7.0 kernel, the project allows enabling this feature via the CONFIG_MULTIKERNEL configuration parameter . If this option is disabled, the resulting kernel is exactly the same and behaves like standard Linux 7.0. Currently, this first version (v7.0-mk2) exclusively supports x86_64 architectures and is designed to bridge the performance and security gap between traditional virtualization and container isolation.

Isolation without performance penalty

The biggest problem with virtualization is the performance "tax" charged by hypervisors. In contrast, Multikernel Linux eliminates virtual machine exit transitions , second-level memory translation, and the overhead generated by device models.

According to performance data published after testing on Xeon Gold 5418Y processors (Sapphire Rapids), the multikernel system demonstrates a dramatic increase in execution speed compared to KVM guests. For example, context switching between processes is 2,5 times faster, pipe latency is reduced by more than half (2,18x), and base system calls, such as read and write operations, gain more than 25% in response time.

Compared to traditional Docker containers, Multikernel offers superior protection because, since the containers share the same host kernel, a kernel-level vulnerability, panic, or internal lock saturation affects all tenants. In the Multikernel ecosystem, each environment has its own independent kernel ; that is, if one instance suffers a critical failure, the others continue operating unaffected, guaranteeing an isolated environment ideal for running everything from web servers to intensive AI training workloads (machine learning) on ​​the same hardware.

Dynamic Assignment and Orchestration with Kerf

Multikernel Linux operates using a host kernel that manages a large pool of resources (CPUs, RAM, and PCI devices). Utilizing the existing device tree structure (accessible at /sys/fs/multikernel/), the kernel carves this pool and launches "child kernels" via the native kexec_file_load() subsystem. Through Linux's hotplug capabilities, these resources can be dynamically moved between instances without requiring a server reboot, ensuring predictable and real-time adjustable performance.

To orchestrate this ecosystem, the developers have introduced the Kerf command-line tool . This utility manages the entire lifecycle of instances, relying on complementary open-source modules. One of these is Lazy CMA, which allocates contiguous physical memory at runtime without requiring any pre-boot configuration.

The other pillar is DAXFS, a module that allows instances to share file systems directly in memory; thanks to this, Kerf can boot a child kernel directly inside a Docker container image, taking advantage of its file system without the need for emulation layers and using in-memory descriptors for network interconnection without data copying.

It is worth mentioning that this first release has passed intensive stability tests under 5-level paging architectures and active KASLR, demonstrating that resource recovery is completely safe even when a child kernel crashes.

By allowing workloads that collided due to system locks (such as a large number of unlink or rename processes on the same cache) to be divided across separate kernels aligned with the physical processor sockets, Multikernel Linux demonstrates the ability to scale beyond the performance barrier imposed by a single monolithic kernel, opening a new era in server consolidation and high-performance cloud computing.

Finally, if you are interested in learning more, you can find the details at the following link.


Add as preferred source in Google