Modal

Building fast filesystems for VMs

Oct 16, 2026Nitin Maddi
Building fast filesystems for VMs
SummaryAI, from the source post

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