Skip to main content
QUICK REVIEW

[Paper Review] Faasm: Lightweight Isolation for Efficient Stateful Serverless Computing

Simon Shillaker, Peter Pietzuch|arXiv (Cornell University)|Feb 21, 2020
Cloud Computing and Resource ManagementComputer Science55 references37 citations
TL;DR

Faasm introduces Faaslets, WebAssembly-based lightweight isolation with shared in-memory state for serverless computing, achieving significant speedups and memory reductions over container-based platforms. It enables fast cold-starts via Proto-Faaslets and two-tier state (local/global) for efficient data sharing.

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

Motivation & Objective

  • Motivate a memory-safe, low-overhead isolation model for data-intensive serverless workloads.
  • Achieve efficient in-memory state sharing while preserving strong isolation.
  • Provide fast initialization through pre-initialized snapshots (Proto-Faaslets).
  • Offer a minimal host interface compatible with multiple languages and legacy code.
  • Demonstrate performance improvements over container-based deployments across ML and linear algebra workloads.

Proposed method

  • Introduce Faaslets, an isolation abstraction using WebAssembly and software fault isolation (SFI).
  • Run multiple Faaslets within a single address space constrained by Linux cgroups and network namespaces for CPU and network isolation.
  • Provide a two-tier state architecture (local shared memory plus global distributed state) via Distributed Data Objects (DDOs).
  • Use Proto-Faaslets to achieve hundreds of microseconds cross-host restoration and fast cold starts.
  • Offer a minimal POSIX/WASI-like host interface for networking, file I/O, dynamic linking and memory management.
  • Compile user code to WebAssembly, validate, link with a trusted host interface, and execute with WAVM as the WebAssembly VM.

Experimental results

Research questions

  • RQ1Can lightweight WebAssembly-based Faaslets provide memory-safe isolation with efficient in-memory state sharing for multi-tenant serverless workloads?
  • RQ2What are the performance and resource-usage trade-offs of Faaslets versus traditional containers for data-intensive tasks?
  • RQ3How effective is the two-tier local/global state architecture in reducing data movement and network transfers?
  • RQ4Can Proto-Faaslets enable fast cross-host restoration and reduce cold-start latency across clusters?
  • RQ5How broad is language support when compiling diverse workloads to WebAssembly within Faaslets?

Key findings

  • Training a machine learning model with SGD yields a 60% run-time improvement, 70% reduction in network transfers, and 90% reduction in memory usage compared to container-based deployment.
  • Machine learning inference with TensorFlow Lite and MobileNet achieves over 200% higher maximum throughput and a 90% reduction in tail latency.
  • Distributed linear algebra (Python/Numpy) incurs negligible performance overhead and a 13% reduction in network transfers.
  • Faasm reduces memory footprint and improves throughput while providing fast initialization via Proto-Faaslets that can be restored across hosts.
  • Faaslets achieve a memory footprint below 200 KB and cold-start times under 10 ms (with Proto-Faaslets providing hundreds of microseconds cross-host restoration).

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.