Faasm: Lightweight Isolation for Efficient Stateful Serverless Computing

Faasm: Lightweight Isolation for Efficient Stateful Serverless Computing
复制标题

DOI:
--
复制
发表时间:
2020-02
期刊:
--
影响因子:
--
通讯作者:
Simon Shillaker;P. Pietzuch
Simon Shillaker;P. Pietzuch
中科院分区:
其他
文献类型:
--
作者:
Simon Shillaker;P. Pietzuch

文献摘要

被引文献

相似文献

无服务器计算非常适合大数据处理,因为它可以快速,便宜地扩展到数千个并行功能。但是,现有的无服务器平台在短暂的无状态容器中隔离功能。这意味着功能无法有效共享内存,迫使用户在撰写功能时反复序列化数据。我们观察到,基于容器的隔离是不适合无服务器的大数据处理的。相反,它需要一种轻巧的隔离方法,以允许有效的状态共享。我们介绍了Faaslets,这是一种用于无服务器大数据计算的新隔离抽象。 FAASLETS使用WebAssembly提供的软件故障隔离(SFI)隔离执行功能的内存,同时允许在同一地址空间中的功能之间共享内存区域。因此,当在同一台机器上将功能共同定位时,Faaslet可以避免昂贵的数据移动。我们用于Faaslets,Faasm的运行时间隔离了其他资源,例如CPU和网络使用标准Linux Cgroups,并提供一个低级POSIX主机接口,用于网络,文件系统访问和动态加载。为了减少初始化时间,FAASM从已经进行的快照中恢复了Faaslet。我们将FAASM与基于标准容器的平台进行了比较,并表明,在训练机器学习模型时,它可以达到2倍的速度,而内存却减少了10倍。为了提供机器学习推断,FAASM将吞吐量加倍,并使尾部潜伏期减少90%。
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, however, isolate functions in ephemeral, stateless containers. This means that functions cannot efficiently share memory, forcing users to serialise data repeatedly when composing functions. We observe that container-based isolation is ill-suited for serverless big data processing. Instead it requires a lightweight isolation approach that allows for efficient state sharing. We introduce Faaslets, a new isolation abstraction for serverless big data 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%.