Home / Companies / Modal / Blog / Post Details
Content Deep Dive

Building fast filesystems for VMs

Blog post from Modal

Post Details
Company
Date Published
Author
-
Word Count
2,807
Company Posts That Month
10
Language
English
Hacker News Points
11
Post removed?
No
Summary

Modal redesigned the filesystem stack for its VM Sandboxes to retain ImageFS’s lazy loading, tiered caching, image compatibility, and sub-second cold starts while overcoming performance problems caused by serving ImageFS through virtio-fs. Although virtio-fs allowed guest VMs to access the host-side filesystem, metadata-heavy operations such as chown required multiple guest-to-host round trips and host syscalls, making common workloads including package installation, code search, and recursive ownership changes substantially slower. The company instead adopted a block-device approach using virtio-blk, allowing the guest kernel’s ext4 filesystem to manage file metadata locally and asynchronously batch writes, eliminating repeated cross-VM filesystem requests. Its resulting ImageFS-blk backend constructs ext4 metadata from an image index while lazily supplying file-data blocks from ImageFS and storing modified blocks separately in a sparse file, enabling block-level copy-on-write rather than OverlayFS’s potentially expensive whole-file copying. Benchmarks showed major improvements, with 100,000 chown calls falling from 9.87 seconds under virtio-fs to 0.21 seconds, bun installation dropping from 12.5 to 1.07 seconds, and database workloads also gaining significantly. VM Sandboxes are now generally available with ImageFS-blk as their storage backend.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
Observability 1 1,557 387 135 -43%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.