Unikernels vs. Containers: A Runtime-Level Performance Comparison for Resource-Constrained Edge Workloads
Hai Dinh-Tuan · 2025
Read Unikernels vs. Containers: A Runtime-Level Performance Comparison for Resource-Constrained Edge Workloads by Hai Dinh-Tuan (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2509-07891.txt.
Introduction
Edge computers in factories have little memory, so the software packaging format matters more than usual. Hai Dinh-Tuan compares unikernels and containers for such workloads in a 2025 research paper written alone. Containers are the mature standard. Unikernels package an application with only the operating system parts it needs, promising lean efficiency.
The study tests applications written in Go and in Node.js, representing two compilation styles. Unikernels started faster and won clearly for the Go workloads under tight memory. Node.js told a different story: below a memory threshold, the unikernel's performance fell sharply while containers stayed stable. Linux's memory management outweighed the unikernel's leanness. The lesson is that the best choice depends on the runtime and the available memory. Edge deployments should therefore be planned workload by workload.
Catalog record
| CREATOR | Hai Dinh-Tuan |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 34 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2509-07891
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Unikernels vs. Containers: A Runtime-Level Performance Comparison for Resource-Constrained Edge Workloads Hai Dinh-Tuan Abstract The choice between containers and unikernels is a critical trade-off for edge applications, balancing the container’s ecosystem maturity against unikernel’s specialized efficiency. However, until now, how this trade-off behaves under the severe memory constraints of industrial edge environments remains insufficiently investigated, especially across different execution models. This work presents an empirical comparison using Go and Node.js applications, representing ahead-of-time (AOT) and just-in-time (JIT) compilation, respectively. While unikernels consistently deliver faster startup times and outperform containers for Go-based workloads in resource-constrained environments, the evaluation results identify a critical performance crossover for Node.js. Below a certain memory threshold, Docker containers maintain stable performance for both I/O-bound and CPU-bound applications, while the Nanos unikernel’s performance degrades sharply. This reveals that Linux’s memory management capabilities can outweigh the minimalist efficiency of unikernels under resource scarcity, a critical trade-off that, until now, has not been adequately quantified for JIT runtimes in this context. These findings demonstrate that the optimal deployment paradigm depends on both runtime behavior and available system resources, underscoring the need for workload-aware deployment strategies in edge computing. I Introduction With the growing adoption of cloud-native technologies across industries [ 1 ] , new approaches are required for both service development and service deployment . While the development aspect has received considerable research attention [ 2 ] , deployment practices are still largely shaped by the dominance of container technologies. Yet, the choice of how services are packaged and deployed represents a critical architectural decision with direct implications for performance, security, and resource utilization. Therefore, this work aims to compare containers and unikernels , particularly in the context of edge workloads operating under resource constraints and across different programming language execution models. Containerization (OCI/Docker) is the de facto way to package and run applications today, offering a mature, robust, and developer-friendly ecosystem. By using Operating System (OS)-level features like Linux namespaces and cgroups , containers provide lightweight application isolation, simplifying deployment and aligning with established cloud-native practices. In contrast, unikernels represent a highly specialized approach by compiling an application with only the necessary OS libraries into a minimal, single-address-space machine image that runs directly on a hypervisor, as shown in Fig. 1 . Fig. 1: Architectural comparison showing a Linux container’s reliance on a shared host kernel versus a unikernel’s specialized, self-contained design running on a hypervisor (recreated from [ 3 ] ). While the trade-off between containers and unikernels is extensively investigated in theory, its practical implications under the constrained and dynamic memory conditions typical of industrial edge environments remain underexplored, particularly for modern execution models. In particular, it is unclear how just-in-time (JIT) compiled runtimes perform in comparison to ahead-of-time (AOT) compiled languages. This work addresses this gap through a comparative benchmark of Docker containers and the Nanos unikernel platform, using both AOT (Go) and JIT (Node.js) applications under varying memory constraints. This work’s contributions are therefore threefold: • Identification of a performance crossover point for JIT: We show that unikernels perform better with sufficient resources, but below a certain threshold, Docker’s mature Linux environment maintains stable performance, while unikernel latency and throughput degrade significantly. • Linking execution model to deployment paradigm: For AOT workloads, unikernels consistently outperform containers under resource-limited conditions. In contrast, for JIT workloads, Docker offers greater stability, especially under resource constraints. • Decision framework for deployment choice: We present practical guidance for selecting the appropriate deployment model based on workload type, execution model, and system constraints. The remainder of this work is structured as follows: Section II discusses related work, Section III details our experimental methodology. Section IV presents our empirical results, and Section V discusses their implications. Finally, Section VI concludes the paper. II Related work Docker containers have emerged as the de facto industry standard, primarily due to their vast community and industry-wide adoption. The availability of robust orchestration tools like Kubernetes 1 1 1 https://kubernetes.io/ and Docker Swarm 2 2 2 https://docs.docker.com/engine/swarm/ provides robust frameworks for scaling, service discovery, and lifecycle management [ 4 ] , which significantly simplifies the deployment of complex applications [ 5 , 6 , 7 , 8 ] . However, this approach also comes with inherent overhead and a broader attack surface, as all containers on a host share the same underlying OS kernel. Unikernels, by design, offer advantages in both security and efficiency. By compiling an application with only the necessary operating system libraries into a minimal, single-address-space machine image, unikernels offer a significantly reduced attack surface and hypervisor-level isolation [ 9 , 10 , 11 ] . Their minimalist architecture also leads to minimal image sizes and boot times in the millisecond range, making them well-suited for resource-constrained and latency-sensitive scenarios such as the network edge [ 12 , 13 ] . Several empirical studies have been proposed to quantify these differences, revealing that the performance outcomes are highly dependent on the specific workload, hardware architecture, and implementation context. For instance, Mavridis et al. [ 14 ] found that while Docker containers generally achieved a higher request rate, MirageOS unikernels offered superior performance with lower latency and minimal memory usage, albeit with the limitation of being language-specific (OCaml). Several studies have also compared containers and unikernels in specific use cases. In the context of 5G Virtual Network Functions (VNFs), Filipe et al. [ 15 ] found that Docker containers had faster instantiation times and lower end-to-end latency, but the IncludeOS unikernel showed an 11% higher throughput for high-bandwidth UDP traffic, highlighting a trade-off between control plane agility and data plane performance. For serverless platforms at the edge, Mistry et al. [ 16 ] demonstrated that a MirageOS-based serverless platform on a resource-constrained Raspberry Pi significantly outperformed a container-based OpenWhisk solution in processing speed, memory consumption, and boot latency, with startup times an order of magnitude faster. However, the maturity of the unikernel ecosystem and its performance on different hardware architectures remain critical considerations. Acharya et al. [ 17 ] highlighted the immaturity of unikernels on the ARMv8 architecture, where KVM was found to be the fastest for network I/O, in stark contrast to the x86 platform where containers and unikernels held an advantage. This underscores that performance is not guaranteed as a whole when using unikernels; rather, it depends strongly on the underlying hardware architecture and the maturity of the specific framework. In addition, the majority of existing comparisons use either system-level benchmarks (e.g., Iperf, SysBench) [ 17 ] or focus on applications written in AOT-compiled languages like C++ or OCaml [ 15 , 16 ] . A significant gap remains regarding systematic, controlled evaluations of how JIT-compiled runtimes like Node.js behave in a unikernel versus a container. Some studies do use resource-constrained hardware, such as Raspberry Pi [ 16 ] , but their conclusions are often oversimplified, typically claiming that one deployment model outperforms the other in that environment, without systematically varying constraints (particularly memory) to reveal why, or under what conditions, such advantages hold. This research addresses that gap by presenting a comprehensive empirical evaluation that isolates the impact of deployment models (Docker vs. Nanos) across both AOT and JIT runtimes under controlled memory and CPU constraints. Unlike prior work, it