When we introduced VM Sandboxes, we wanted to preserve Modal’s sub-second cold starts without compromising performance.
We ended up building a new filesystem stack that dramatically improved performance, and wrote about the engineering challenges and decisions that got us there.
The secret to Modal's speed is our custom lazily loaded container filesystem, ImageFS. ImageFS is built on a massive tiered distributed filesystem, layering local NVMe disks, regional and p2p caches, and global blob stores.
When we launched VM Sandboxes this month, we wanted to make sure they could take advantage of ImageFS in the same way our gVisor containers do. To do that, we built out a new filesystem stack that tricks a VM's ext4 driver into thinking it's talking to a normal disk.