Back to articles
Technology Insight

Optimizing Incus: High-Performance Linux Container Management on Bare-Metal VPS

May 28, 2026

Introduction to the Next Era of Containerization

In the evolving landscape of infrastructure virtualization, system administrators and DevOps engineers increasingly seek the holy grail of system deployment: the efficiency of containers combined with the isolation and robustness of full virtual machines. For years, Linux Daemon (LXD) filled this niche perfectly, offering system-level container management that felt like a hypervisor but performed like a container engine. However, following structural shifts in the LXD ecosystem, the open-source community rallied behind Incus—a powerful, independent fork under the stewardship of the Linux Containers project.

Deploying Incus on bare-metal Virtual Private Servers (VPS) unlocks unprecedented hardware efficiency. Unlike application container runtimes like Docker, Incus excels at running full, multi-service init-driven operating systems (systemd-based Linux Containers or LXC) with near-zero virtualization overhead. This technical guide provides an exhaustive blueprint for configuring Incus on bare-metal nodes to achieve maximum throughput, absolute resource predictability, and multi-tenant isolation.

1. The Bare-Metal Edge and Incus Architecture

Running high-performance workloads requires a deep understanding of why standard virtualization stacks introduce latency. Traditional Type-2 or even Type-1 hypervisors introduce abstraction layers for hardware execution. CPU instructions must pass through binary translation or hardware-assisted virtualization extensions (Intel VT-x/AMD-V), while memory management suffers from nested page table lookups.

Incus bypasses these layers entirely when deploying Linux Containers. Because an Incus container shares the host's Linux kernel natively, it utilizes standard kernel namespaces (pid, net, mnt, ipc, uts, user) and cgroups (control groups) to segment resources. Executing a process inside an Incus container is syntactically and physically identical to executing it on the host host system. On a bare-metal VPS, this means your applications gain direct access to the underlying silicon, eliminating the hypervisor tax and maximizing Input/Output Operations Per Second (IOPS).

2. Essential Host Kernel Tuning for High Concurrency

Before initializing Incus, the host kernel must be optimized to handle the intensive resource multiplexing required by dozens of concurrent, high-performance system containers. Out-of-the-box Linux distribution configurations prioritize single-user desktop or conservative server workloads. We must adjust these thresholds to avoid bottlenecks under load.

Modify the system control configuration file at /etc/sysctl.d/99-incus-performance.conf to apply the following production settings:

fs.file-max = 2097152
fs.inotify.max_user_instances = 8192
fs.inotify.max_user_watches = 2097152
vm.max_map_count = 262144
vm.swappiness = 10

These values ensure that the system does not run out of file descriptors or inotify handles when multiple containers are actively monitoring file changes or handling thousands of network connections. Setting vm.swappiness to 10 prevents premature paging to disk, prioritizing the retention of active memory pools within physical RAM modules.

3. High-Performance Storage Architecture: The Case for ZFS

Storage operations are typically the primary bottleneck in multi-tenant container hosting. Standard directory-backed storage pools (using ext4 or xfs) rely on slow, synchronous copy-on-write mechanisms when launching containers from images. For high-performance environments, leveraging a dedicated storage backend like ZFS on Linux or Btrfs is mandatory.

ZFS provides structural advantages that directly elevate Incus operations:

  • Block-Level Cloning: Instantly provision containers from base images via copy-on-write snapshots without data duplication or disk write penalties.
  • Adaptive Replacement Cache (ARC): Advanced read-caching algorithms utilize host RAM dynamically, serving frequently hit files directly from memory blocks.
  • In-line Compression: Enabling algorithms like lz4 or zstd reduces disk space requirements while actually increasing read speeds, as fewer physical disk sectors need to be queried.

When running incus admin init, it is highly recommended to allocate a raw, unformatted NVMe partition or dedicated block volume specifically for a ZFS storage pool. Avoid file-backed loop devices in production, as they suffer from double-caching inefficiencies and introduce file-system fragmentation.

4. Advanced Networking and Interface Configuration

By default, Incus creates a managed NAT bridge (usually called incusbr0). While perfect for development and staging environments, NAT bridges introduce CPU overhead due to packet rewriting via iptables/nftables and can complicate external routing for public services.

To extract maximum performance and lower network latency, architectural engineers deploy one of two methodologies:

  1. Physical Network Bridging: Creating a native Linux bridge tied directly to the VPS hardware NIC interface. Containers receive real, routable IP addresses directly from the uplink provider, bypassing host routing structures completely.
  2. SR-IOV (Single Root I/O Virtualization): For hardware that explicitly supports it, passing virtual network functions directly into the container namespace. This delivers raw network interface speed with practically zero overhead.

If sticking with an Incus-managed bridge for security boundaries, switch the backend driver from the legacy standard Linux bridge to Open vSwitch (OVS). Open vSwitch handles high-volume traffic flows more gracefully and allows for granular Quality of Service (QoS) rules to prevent network starvation across containers.

5. Production-Grade Deployment Strategy and Security

Achieving high performance must not come at the expense of infrastructure security. Since system containers share the host kernel, hardening the boundary walls is paramount. Incus implements a highly secure architecture out of the box through unprivileged containers by default, mapping container root (UID 0) to an unprivileged user id on the host system.

To further enforce boundaries without sacrificing execution throughput, consider the following production paradigms:

  • CPU Pinning: Restrict volatile workloads from thrashing the CPU scheduler by assigning explicit cores to specific containers using the configuration flag limits.cpu=2-4.
  • Memory Hard Limits: Ensure predictable system behavior by capping memory consumption and disabling swap usage for erratic processes using limits.memory=8GiB and limits.memory.swap=false.
  • Kernel Namespaces Hardening: Explicitly drop unnecessary kernel capabilities (like raw system clock manipulation or kernel module loading) within the container profile definition.

Regularly auditing container behavior using system monitoring agents like Prometheus and Grafana ensures that resource allocations remain optimized and anomalies are caught before causing cascading performance degradation across your cluster node.

Conclusion: Unlocking True Efficiency

Incus bridges the historical divide between application portability and raw operational power. By moving away from hypervisor-heavy virtualization and standardizing on a finely tuned Incus cluster running on bare-metal Linux VPS, enterprises can achieve significant cost reductions, lightning-fast boot times, and density metrics that are simply unachievable with standard virtual machines. With correct kernel, storage, and network configurations applied, your Incus node stands ready to handle enterprise workloads at maximum efficiency.

Optimizing Incus: High-Performance Linux Container Management on Bare-Metal VPS | DPTCloud