Benchmarking, Analysis, and Optimization of Serverless Function Snapshots

Functions access stable working sets across invocations → prefetch from disk to cut cold-start latency by 3.7×

Featured image

Venue: ASPLOS 2022
Slides: Google Slides

Topic: Snapshotting is already used to reduce cold-start latency in serverless, but snapshot-based invocations still run 95% slower than memory-resident ones due to page faults. Functions access a stable, predictable working set → prefetch it.


Summary

Snapshot-based cold starts still suffer from frequent page faults as guest memory is loaded from disk one page at a time. Key insight: the same function accesses the same stable working set of pages across different invocations. → REAP records the working set on first invocation and proactively prefetches it for subsequent cold starts. Result: 97% reduction in page faults, 3.7× cold-start latency improvement.


Background

Snapshotting as a cold-start mitigation

The remaining problem: page faults


Key Idea

Observation

Functions access the same stable working set of memory pages across different invocations of the same function.

Action

REAP (Record-And-Prefetch): a lightweight software mechanism inside the vHive-CRI orchestrator.


Design

vHive: the experimental framework

REAP workflow

  1. Record phase: On first cold invocation, trace all guest memory page faults using userfaultfd. Store the accessed page addresses as the function’s working set record.
  2. Prefetch phase: On subsequent cold invocations, replay the record to prefetch pages from disk into memory before execution begins.

Why it works


Evaluation

Results:


Meeting Notes

(to be filled)