arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.01129cs.DCcs.OS
收藏

Mewz:基于Unikernel的高隔离性、高可移植性WebAssembly轻量级执行环境

Mewz: Lightweight Execution Environment for WebAssembly with High Isolation and Portability using Unikernels

Soichiro Ueda, Ai Nozaki, Daisuke Kotani, Yasuo Okabe

AI总结:

针对云端虚拟机与容器组合使用时的可移植性不足、双重开销问题,提出结合Wasm与unikernel的Mewz系统,通过Wasm AoT编译转unikernel镜像实现高隔离与轻量可移植,性能较现有方案提升30%。

摘要:

云计算要求工作负载具备隔离性与可移植性。云厂商必须将每个用户的资源与其他用户隔离,防止用户攻击其他用户或整个系统。用户可能希望将应用迁移到不同环境,例如其他云平台、本地服务器或边缘设备。虚拟机(VM)和容器被广泛用于满足这些需求,但虚拟机与容器的组合使用存在两个问题。首先,容器镜像依赖于宿主操作系统和CPU架构,用户需要为每个平台管理不同的容器镜像,才能在不同操作系统和指令集架构(ISA)上运行相同代码。其次,虚拟机和容器的双重开销会导致性能下降。以往研究分别解决了这两个问题,但没有方案能同时解决两者。因此,云端应用执行环境需要在保障隔离性的同时,实现更轻量、更具可移植性的特性。我们提出了一种结合WebAssembly(Wasm)与unikernel(库操作系统)的新系统。Wasm是一种可移植二进制格式,可在任何宿主操作系统和架构上运行;unikernel是与应用静态链接的内核,可降低客户机内核开销。在该方案中,用户将应用部署为Wasm二进制文件,它将以unikernel的形式在云端运行。为实现该系统,我们提出了一种将Wasm二进制文件转换为unikernel镜像的机制,其中Wasm会被提前(AoT)编译为本地代码。我们开发了集成Wasm系统接口(WASI)API的unikernel,以及将Wasm转换为本地代码的提前(AoT)编译器。我们通过运行一个被编译为Wasm和本地代码的简单HTTP服务器评估了系统性能。结果显示,与在虚拟机上的Linux系统中使用现有Wasm运行时运行相比,该系统性能提升了30%。

英文摘要:

Cloud computing requires isolation and portability for workloads. Cloud vendors must isolate each user's resources from others to prevent them from attacking other users or the whole system. Users may want to move their applications to different environments, for instance other cloud, on-premise servers, or edge devices. Virtual machines (VMs) and containers are widely used to achieve these requirements. However, there are two problems with combined use of VMs and containers. First, container images depend on host operating systems and CPU architectures. Users need to manage different container images for each platform to run the same codes on different OSes and ISAs. Second, performance is degraded by the overheads of both VMs and containers. Previous researches have solved each of these problems separately, but no solution solves both problems simultaneously. Therefore, execution environments of applications on cloud are required to be more lightweight and portable while ensuring isolation is required. We propose a new system that combines WebAssembly (Wasm) and unikernels. Wasm is a portable binary format, so it can be run on any host operating systems and architectures. Unikernels are kernels statically linked with applications, which reduces the overhead of guest kernel. In this approach, users deploy applications as a Wasm binary and it runs as a unikernel on cloud. To realize this system, we propose a mechanism to convert a Wasm binary into a unikernel image with the Wasm AoT-compiled to native code. We developed a unikernel with Wasm System Interface (WASI) API and an Ahead-of-Time (AoT) compiler that converts Wasm to native code. We evaluated the performance of the system by running a simple HTTP server compiled into Wasm and native code. The performance was improved by 30\% compared to running it with an existing Wasm runtime on Linux on a virtual machine.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑