SOCK: Rapid Task Provisioning with Serverless-Optimized Containers
Lean containers + generalized Zygote provisioning + three-tier package-aware caching → 45× cold-start speedup
Venue: ATC 2018
Topic: Container initialization and Python package import are the main sources of slow serverless cold starts. SOCK addresses both with lean isolation primitives, Zygote-based provisioning, and three-tier caching.
Summary
FaaS cold starts are dominated by two costs: (1) container initialization overhead (network/mount namespace scalability bottlenecks), and (2) Python package import time (~100 ms for popular packages). SOCK (Serverless-Optimized Containers) integrates with OpenLambda and provides:
- 18× speedup over Docker via lightweight isolation primitives.
- Additional 3× speedup via generalized Zygote provisioning.
- 45× total speedup with a three-tier package-aware caching system.
Background
Container initialization bottlenecks
- Linux network and mount namespaces have scalability bottlenecks at high concurrency.
- Standard containers (Docker) pay high setup costs for each invocation.
Python package import costs
- 36% of imports are to just 0.02% of packages — highly skewed.
- Importing popular libraries adds ~100 ms to startup.
- Installing packages can take seconds.
Key Idea
Three techniques
1. Lightweight isolation primitives
- Avoid network and mount namespace scalability bottlenecks identified in the Linux primitive study.
- Use lighter-weight alternatives for sandboxing.
- Achieves 18× speedup over Docker.
2. Generalized Zygote provisioning
- Zygote: a pre-initialized Python runtime process that forks for each invocation.
- Avoids repeated initialization of the Python runtime.
- 3× additional speedup.
3. Three-tier package-aware caching
- Tier 1: initialized runtime (Zygote base).
- Tier 2: Zygotes with pre-imported package sets.
- Tier 3: full function instances.
- Leverages the skewed package distribution (top 0.02% packages cover 36% of imports).
- 45× speedup over SOCK without Zygote initialization.
Design
- Lean container system: replaces Docker with SOCK for Python handler sandboxing in OpenLambda.
- Avoids kernel scalability bottlenecks in network/mount namespaces.
- Generalized Zygote provisioning: scales Zygote approach to large sets of untrusted packages.
- Three-layer caching: reduces package install and import costs systematically.
Evaluation
- Integrated into the OpenLambda serverless platform.
- 2.8× reduction in platform overhead vs. AWS Lambda.
- 5.3× reduction vs. OpenWhisk.
- Evaluated in an image-resizing case study.
Meeting Notes
(to be filled)