[论文解读] Faasm: Lightweight Isolation for Efficient Stateful Serverless Computing
Faasm 引入 Faaslets,是基于 WebAssembly 的轻量隔离,具备共享内存状态用于无服务器计算,在相对于基于容器的平台上实现显著的加速和内存降低。它通过 Proto-Faaslets 实现快速冷启动,并采用本地/全局两层状态以实现高效的数据共享。
Serverless computing is an excellent fit for big data processing because it can scale quickly and cheaply to thousands of parallel functions. Existing serverless platforms isolate functions in ephemeral, stateless containers, preventing them from directly sharing memory. This forces users to duplicate and serialise data repeatedly, adding unnecessary performance and resource costs. We believe that a new lightweight isolation approach is needed, which supports sharing memory directly between functions and reduces resource overheads. We introduce Faaslets, a new isolation abstraction for high-performance serverless computing. Faaslets isolate the memory of executed functions using software-fault isolation (SFI), as provided by WebAssembly, while allowing memory regions to be shared between functions in the same address space. Faaslets can thus avoid expensive data movement when functions are co-located on the same machine. Our runtime for Faaslets, Faasm, isolates other resources, e.g. CPU and network, using standard Linux cgroups, and provides a low-level POSIX host interface for networking, file system access and dynamic loading. To reduce initialisation times, Faasm restores Faaslets from already-initialised snapshots. We compare Faasm to a standard container-based platform and show that, when training a machine learning model, it achieves a 2x speed-up with 10x less memory; for serving machine learning inference, Faasm doubles the throughput and reduces tail latency by 90%.
研究动机与目标
- 为数据密集型无服务器工作负载提供一种内存安全、低开销的隔离模型的动机。
- 在保持强隔离的同时实现高效的就地内存状态共享。
- 通过预初始化快照(Proto-Faaslets)提供快速初始化。
- 提供与多种语言和遗留代码兼容的最小主机接口。
- 在机器学习和线性代数工作负载上展示相较于基于容器的部署的性能提升。
提出的方法
- 引入 Faaslets,一种使用 WebAssembly 和软件容错隔离(SFI)的隔离抽象。
- 在单个地址空间内运行多个 Faaslets,受限于 Linux cgroups 和网络命名空间以实现 CPU 和网络隔离。
- 通过分布式数据对象(DDOs)提供两层状态体系结构(本地共享内存与全局分布式状态)。
- 使用 Proto-Faaslets 实现数百微秒的跨主机恢复和快速冷启动。
- 提供一个与 POSIX/WASI 类似的最小主机接口,用于网络、文件 I/O、动态链接和内存管理。
- 将用户代码编译为 WebAssembly、进行验证、与可信主机接口链接,并使用 WAVM 作为 WebAssembly VM 执行。
实验结果
研究问题
- RQ1轻量级的基于 WebAssembly 的 Faaslets 是否能够为多租户无服务器工作负载提供内存安全的隔离和高效的就地内存状态共享?
- RQ2对于数据密集型任务,Faaslets 相较于传统容器的性能与资源使用权衡是什么?
- RQ3两层本地/全局状态架构在减少数据移动和网络传输方面的效果如何?
- RQ4Proto-Faaslets 是否能够实现跨主机快速恢复并降低跨集群的冷启动延迟?
- RQ5在 Faaslets 中将多样化工作负载编译为 WebAssembly 时,语言支持的广度如何?
主要发现
- 使用 SGD 训练机器学习模型在运行时间上提升 60%,网络传输减少 70%,内存使用减少 90%,相较于基于容器的部署。
- 使用 TensorFlow Lite 和 MobileNet 的机器学习推断达到超过 200% 的最大吞吐量提升,尾部延迟降低 90%。
- 分布式线性代数(Python/Numpy)的性能开销可以忽略不计,网络传输减少 13%。
- Faasm 在提供跨主机可恢复的 Proto-Faaslets 的同时,减少内存占用、提高吞吐量,并实现快速初始化。
- Faaslets 的内存占用低于 200 KB,冷启动时间在 10 ms 以下(Proto-Faaslets 提供跨主机数百微秒的恢复)。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。