Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
110 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
44 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Faasm: Lightweight Isolation for Efficient Stateful Serverless Computing (2002.09344v2)

Published 21 Feb 2020 in cs.DC

Abstract: 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%.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (2)
  1. Simon Shillaker (4 papers)
  2. Peter Pietzuch (24 papers)
Citations (236)

Summary

  • The paper introduces Faaslets, a novel abstraction using WebAssembly and SFI to enable direct memory sharing that minimizes data duplication.
  • The paper presents a two-tier state architecture that combines local shared memory with global state distribution to lower cold-start latencies.
  • The paper demonstrates significant performance gains, including a 60% reduction in ML training times and 90% lower tail latency compared to container-based systems.

Faasm: Advancing Stateful Serverless Computing

The paper "Faasm: Lightweight Isolation for Efficient Stateful Serverless Computing" explores the innovative design of Faaslets, a novel isolation abstraction aimed at enhancing the performance of serverless computing environments, particularly those requiring efficient stateful function execution. This paper provides critical insight into the shortcomings of existing serverless platforms, such as their reliance on container-based isolation, which incurs significant resource overhead and data access latency due to their stateless natures.

Key Contributions

The main contribution of this research is the introduction of Faaslets, an abstraction that employs Software-Fault Isolation (SFI) utilizing WebAssembly to permit shared memory regions between functions. This directly addresses the common bottleneck encountered in serverless computing: the repeated serialization and duplication of data across function instances. Faaslets enable improved performance by facilitating direct memory sharing where possible, thereby reducing unnecessary data movement when functions are co-located.

Another pivotal aspect of the Faasm runtime, which executes Faaslets, is its two-tiered state architecture. This design marries efficient local shared memory access with the distributed accessibility of global state, allowing functions within a single address space to maximize in-memory processing without compromising on distribution capabilities. The runtime manages resources like CPU cycles and networking using Linux cgroups, ensuring that each Faaslet operates with a fair allocation of resources.

Additionally, to tackle the initialization latency often seen in serverless environments, Faasm introduces Proto-Faaslets. These are essentially snapshot-based methodologies that allow for rapid instantiation of Faaslet states, significantly reducing cold-start times. This efficient snapshot mechanism is not only fast but also agnostic to the operating system, enabling scalability across a cluster of Faasm instances.

Performance Evaluation

The evaluation of Faasm demonstrates substantial improvements over traditional container-based platforms, exemplified by a 60% reduction in machine learning training times and a 90% reduction in tail latency for inference serving applications. Faasm's ability to handle tasks with 10 times less memory than Docker containers considerably enhances serverless capacity, enabling a denser packing of functions on a single host.

For applications implemented in dynamic languages, such as Python, Faasm maintains competitive performance despite the overheads associated with WebAssembly compilation. This is managed efficiently through well-engineered memory safety and resource isolation, ensuring that even complex runtime applications do not suffer prohibitive performance losses.

Implications and Future Directions

The results presented substantiate the potential of Faaslets in transforming serverless architectures, particularly in data-intensive scenarios where rapid scaling and stateful operations are critical. The ability to share memory efficiently opens new avenues for optimizing serverless applications that require substantial data manipulation and transformation.

Future developments in this domain could explore further optimization of shared memory models, potentially integrating with upcoming WebAssembly features such as support for multi-memory and SIMD operations. Expanding language support and improving integration with existing cloud infrastructure would also be beneficial steps. As serverless computing continues to diverge into new application domains, the principles demonstrated by Faasm could provide foundational support for increasingly complex and distributed computational workflows.

Conclusion

The Faasm runtime and Faaslets present a significant advancement in serverless computing, evidencing the importance and viability of lightweight isolation and efficient state sharing. By moving beyond the limitations of container-based isolation, this research advocates for and exemplifies a future where serverless computing can become a more robust, scalable, and resource-efficient computing paradigm.