Core Concepts
Mewz leverages the portability of WebAssembly and the efficiency of unikernels to create a lightweight and portable execution environment for cloud applications, addressing the limitations of traditional VMs and containers.
Abstract
Mewz: A Novel Approach to Cloud Workload Execution
This research paper introduces Mewz, a new system designed to enhance the execution of applications in cloud environments. The authors address the limitations of existing virtualization technologies like Virtual Machines (VMs) and containers, particularly concerning portability and performance overhead.
The Problem with Existing Solutions
- Portability Issues with Containers: Container images are dependent on the host operating system and CPU architecture, making it challenging to deploy the same application across diverse cloud environments.
- Performance Overhead of VMs and Containers: VMs introduce overhead when applications access hardware due to the virtualization layer. Containers, while lightweight, suffer from network isolation overhead. Combining both leads to significant performance degradation.
The Mewz Solution: Combining WebAssembly and Unikernels
Mewz proposes a novel approach by combining two key technologies:
- WebAssembly (Wasm): A portable binary format that enables applications to run on any operating system and architecture.
- Unikernels: Specialized kernels tailored for a single application, reducing overhead by directly linking the application with the kernel.
Mewz Architecture and Implementation
- Application Distribution: Applications are compiled into Wasm binaries and distributed.
- Unikernel Image Creation: In the cloud, Wasm binaries are linked with Mewz, a unikernel specifically designed to execute Wasm applications.
- Execution on VMs: The resulting unikernel images are run on VMs, ensuring isolation.
Key Components of Mewz
- Mewz Unikernel: Provides a minimal set of functionalities required for Wasm execution, including a WASI API implementation, memory management, networking, and a read-only file system.
- Wasker (AoT Compiler): Converts Wasm binaries to native code for the target architecture, enabling direct linking with the Mewz kernel.
Performance Evaluation
- A simple HTTP server was used to benchmark Mewz against WasmEdge (a Wasm runtime on Linux), Nanos (a Linux-based unikernel), and native Linux.
- Mewz demonstrated 1.3 times higher throughput than WasmEdge, highlighting its lower overhead.
- However, native Linux and Nanos outperformed Mewz, likely due to optimizations in native code compilation and the use of more efficient I/O mechanisms.
Future Directions
- Enhancements to the Wasm compiler and WASI API could further improve Mewz's performance.
- Implementing persistent file system mechanisms like 9pfs or virtiofs.
Conclusion
Mewz presents a promising solution for deploying cloud applications with improved portability and reduced overhead. By leveraging the strengths of WebAssembly and unikernels, Mewz offers a lightweight and efficient alternative to traditional virtualization technologies.
Stats
Mewz achieved 1.3 times higher throughput than WasmEdge on Linux.
Linux and Nanos achieved 2.5 times and 2.2 times higher throughput than Mewz, respectively.
Executing Wasm code and WASI functions consumed a significant portion of CPU clock cycles in Mewz, as per profiling.