Home Multikernel Private Cloud Multikernel Sandbox Multikernel LiveUpdate ARM Platform RISC-V Platform OEM & Embedded SaaS & Database Clouds High-Frequency Trading Technology How It Works Performance FAQ Getting Started Blog About 中文 GitHub Schedule a Demo

Getting Started with Multikernel

Partition a single machine into independent Linux kernel instances, each with dedicated CPUs, memory, and devices. No hypervisor, no virtualization overhead, direct hardware access.

1

Build the Kernel

Clone and compile the multikernel-enabled Linux kernel

2

Install Kerf

Set up the tool that manages resource pools and instances

3

Launch Instances

Use kerf to create, configure, and run kernel instances

What is Multikernel Linux?

Multikernel Linux runs multiple independent kernel instances simultaneously on the same physical machine. Each application receives its own kernel with dedicated CPUs and memory, free from interrupt interference, while device drivers and I/O processing run in a separate kernel on separate cores. Because no hypervisor is involved, every instance runs at native performance.

┌─────────────────┐  ┌─────────────────┐  ┌─────────────────┐
│   Web Server    │  │    Database     │  │   ML Training   │
├─────────────────┤  ├─────────────────┤  ├─────────────────┤
│  Linux Kernel   │  │  Linux Kernel   │  │  Linux Kernel   │
│  (Web-tuned)    │  │  (I/O-optimized)│  │  (GPU-optimized)│
├─────────────────┤  ├─────────────────┤  ├─────────────────┤
│   CPU + NIC     │  │   CPU + NVMe    │  │   CPU + GPU     │
└─────────────────┘  └─────────────────┘  └─────────────────┘
                

Each workload runs inside its own kernel with a configuration tailored to that workload, fully isolated from other instances. A driver crash or kernel exploit in one instance cannot affect the others, and resources can be rebalanced between kernels at runtime through standard Linux hotplug interfaces.

Containers VMs Multikernel
Isolation Shared kernel Full (hypervisor) Separate kernels
Performance Near-native 5-20% overhead Native
Kernel customization No Yes Yes
Dynamic resources Yes Limited Yes (hotplug)
Zero-downtime updates App only With orchestration Kernel + app
Attack surface Full kernel Reduced Minimal per instance

1 Build the Multikernel Kernel

Clone the Linux kernel source with multikernel support and build it with CONFIG_MULTIKERNEL and CONFIG_MKTTY enabled.

git clone https://github.com/multikernel/linux.git
cd linux
cp /boot/config-$(uname -r) .config  # Start from the running kernel's config
make menuconfig  # Enable CONFIG_MULTIKERNEL=y and CONFIG_MKTTY=y
make -j$(nproc)
sudo make modules_install
sudo make install

CONFIG_MULTIKERNEL depends on CONFIG_MEMORY_HOTPLUG, CONFIG_MEMORY_HOTREMOVE, and CONFIG_CONTIG_ALLOC; enable them first if your starting config lacks them. The kernel uses them to carve out memory for spawned kernels at runtime, so no extra module, boot parameter, or reboot is needed.

The result is a standard Linux kernel with multikernel extensions. It boots and operates as the regular host kernel, and can additionally spawn and manage new kernel instances.

2 Install the Kerf Management Tool

Kerf is the command-line tool for creating, configuring, and managing multikernel instances. It handles resource allocation, kernel loading, and the full instance lifecycle.

git clone https://github.com/multikernel/kerf.git
cd kerf
pip install -e .

3 Launch Your First Instance

Initialize a resource pool, create an instance, and launch it:

# Initialize: CPUs 4-31 and an 8 GB memory pool, carved out at runtime
kerf init --cpus=4-31 --memory=8GB

# Create an instance with 4 CPUs and 2 GB of memory
kerf create web-server --cpus=4-7 --memory=2GB

# Load a kernel that boots straight into a Docker image (via DAXFS)
kerf load web-server --kernel=/boot/vmlinuz --image=nginx:latest --console=mktty0

# Boot the instance and attach to its console (Ctrl+] then . to detach)
kerf start web-server --console

The spawned kernel boots on the assigned CPUs and memory, running directly on the hardware. It has its own scheduler, its own network stack, and its own view of the devices assigned to it.

With --image, kerf builds a DAXFS image from the Docker image, and the spawned kernel mounts it directly as its root filesystem. DAXFS is an out-of-tree kernel module that kerf does not load automatically. Load it before running kerf load, but only when booting from a Docker image or sharing a host directory:

git clone https://github.com/multikernel/daxfs.git
cd daxfs
make
sudo insmod daxfs.ko

The spawned kernel also requires DAXFS support: either build it into the kernel, or pass --initrd with an initramfs that loads daxfs.ko. A conventional boot using --initrd alone does not require DAXFS.

Key Components

The multikernel stack is composed of several open-source projects:

  • Multikernel Linux - Kernel patches that enable spawning and managing additional kernel instances through the kexec subsystem
  • Kerf - Orchestration tool that manages kernel instances, resource pools, and lifecycle
  • DAXFS - Out-of-tree kernel module that provides a shared filesystem across kernel instances via direct memory access, enabling a shared container root filesystem and zero-copy data sharing

How It Works Under the Hood

  • Kernel spawning via kexec - New kernels are launched through Linux's existing kexec mechanism, extended to run alongside the primary kernel rather than replacing it
  • Resource partitioning - CPUs, memory, and devices are divided between kernels through standard hotplug interfaces
  • Hardware queue sharing - Modern NICs and SSDs expose multiple hardware queues; each kernel receives exclusive access to specific queues, providing isolation at the hardware level
  • Inter-kernel networking - Each spawned kernel receives a standard Linux network device backed by descriptor rings in shared memory; frames stay in place and only descriptors cross kernel boundaries, so applications use unmodified sockets
  • Docker integration - Spawned kernels can boot directly into Docker images, using DAXFS to share the container root filesystem without an OS init layer

Ready to Try It?

All multikernel components are open source. Explore the code, file issues, or contact us to arrange a technical evaluation.