Serverless computing relies on extreme multi-tenancy to remain economically viable, driving providers to rely on virtual machines (VMs) that ensure strong isolation and seamless ecosystem compatibility with the FaaS programming model. However, current architectures tightly couple application processing logic with I/O processing, forcing every VM to duplicate a heavy communication fabric (cloud SDK, RPC, and TCP/IP). Our analysis reveals this duplication consumes over 25% of a function's memory footprint, and may double the CPU cycles in VMs compared to bare-metal execution. While prior systems attempt to solve this using WebAssembly or library OSes, they naively sacrifice ecosystem compatibility, forcing developers to migrate code and dependencies to new languages. We introduce Nexus, a serverless-native KVM-based hypervisor that transparently decouples compute from I/O. Nexus shifts the execution model by intercepting communication fabric at the API boundary and offloading it to an always-on host shared backend via zero-copy shared memory. This removes the heavyweight communication fabric from the guest VM, while preserving the conventional serverless programming model. By structurally separating these domains, Nexus unlocks asynchronous I/O optimizations: overlapping input payload prefetching with VM restoration from a snapshot and writing output payloads back to storage off the critical path. Compared to the production baseline, Nexus reduces overall node-level CPU and memory consumption by up to 44% and 31%, respectively, thus increasing deployment density by 37%. Also, Nexus reduces warm- and cold-start latency by 39% and 10%, respectively, bringing the response time within 20% of that of a WASM-based, ecosystem-incompatible hypervisor.
翻译:无服务器计算依赖极致的多租户技术来维持经济可行性,促使提供商采用虚拟机(VM)以确保强隔离性,并与FaaS编程模型保持无缝生态兼容性。然而,当前架构将应用处理逻辑与I/O处理紧密耦合,迫使每台虚拟机重复部署繁重的通信框架(云SDK、RPC和TCP/IP)。我们的分析表明,这种重复部署消耗了函数超过25%的内存占用,且与裸机执行相比,虚拟机中的CPU周期可能翻倍。尽管先前的系统尝试通过WebAssembly或库操作系统解决该问题,但它们牺牲了生态兼容性,迫使开发者将代码和依赖项迁移至新语言。我们提出Nexus——一种基于KVM的无服务器原生虚拟机监控器,能够透明地分离计算与I/O。Nexus通过在API边界拦截通信框架并将其通过零拷贝共享内存卸载至始终运行的主机共享后端,从而改变执行模型。这消除了客户虚拟机中的繁重通信框架,同时保留了传统的无服务器编程模型。通过结构性分离这些域,Nexus实现了异步I/O优化:将输入负载预取与快照恢复操作重叠,并将输出负载写回存储,使其脱离关键路径。与生产基线相比,Nexus将节点级CPU和内存消耗分别降低达44%和31%,从而使部署密度提升37%。此外,Nexus将冷启动和热启动延迟分别减少39%和10%,使响应时间接近基于WASM但生态不兼容的虚拟机监控器的20%以内。