Building fast filesystems for VMs
Oct 16, 2026Nitin Maddi

Summary
This post details the evolution of Modal's filesystem stack to support VM Sandboxes, focusing on the performance challenges encountered with virtio-fs and the subsequent adoption of a block-based approach (ImageFS-blk) over virtio-blk. It explains how ImageFS, originally designed for containers, was adapted for VMs by using virtio-fs, and the performance regressions observed. The solution involves creating a sparse ext4 filesystem within the guest VM, where ImageFS concepts are applied to serve file content on demand via block requests over virtio-blk, significantly improving metadata-intensive operations like `chown` and `stat`.
More from the Sandboxed Code Execution trail
- NVIDIA Vera CPUs double throughput for Modal Sandboxes
- VM Sandboxes: Full computers for agents | Modal Blog
- Sidecars: A low-latency trust boundary for Sandboxes | Modal Blog
- Runtime Roundup: VM Sandboxes, Multi-node clusters, and more | Modal Blog
- Product updates: Sandbox Sidecars, new models, a refreshed dashboard, and more | Modal Blog