Executive Summary
Vercel has detailed significant performance optimizations for its Sandbox filesystem snapshots, drastically cutting restore latency. The company reduced p75 restore times from over 40 seconds to under one second by implementing parallelized downloads, multi-threaded decompression, and a local NVMe disk cache. These enhancements improve the core user experience and power a new beta feature called Automatic Persistence, which enables an instant-on feel for development environments.
Key Takeaways
* Initial Problem: Snapshot restore times were unacceptably slow, with p75 latency at over 40 seconds and p95 at 50 seconds.
* Parallelization: The initial sequential process was optimized by parallelizing S3 downloads using `Range` requests and fanning out decompression across multiple goroutines.
* Streaming & Caching: Vercel now streams S3 downloads directly into the decompressor, eliminating intermediate disk writes. A local NVMe disk cache for decompressed snapshots was added, resulting in a 95% cache hit rate.
* Performance Gains: The optimizations resulted in p75 restore times dropping to sub-second levels and p95 times falling to 5 seconds.
* New Feature Enabled: These speed improvements power the new "Automatic Persistence" feature (now in beta), which automatically snapshots and restores a named sandbox's filesystem when it's stopped and resumed.
Strategic Importance
This massive performance gain transforms a slow utility into a core component of a seamless developer workflow, significantly reducing friction and wait times. It makes the Vercel Sandbox a more competitive and fluid "instant-on" development environment.