We made our sandbox filesystem 47× faster by deleting it
The microsandbox filesystem has been significantly improved, achieving a speed increase of 47 times. This enhancement was made possible by replacing the user-space filesystem with a Linux disk image that the VM can mount directly. The changes have resulted in a more efficient system, with reduced code complexity and improved performance across platforms.
- ▪The speedup was achieved by replacing the user-space filesystem with a Linux disk image.
- ▪The geometric mean speedup across the filesystem suite is 47 times, with some cases exceeding 1,000 times faster.
- ▪The new filesystem design allows for identical behavior on both Linux and macOS.
Opening excerpt (first ~120 words) tap to expand
A user in our Discord said microsandbox felt slow. Listing every file in the Python standard library took 5.3 seconds inside a sandbox; in Docker it took milliseconds. We went digging. We fixed it in v0.4: we replaced our user-space filesystem with a Linux disk image that the VM mounts directly. The geometric mean speedup across our mixed guest-visible filesystem suite is 47×, with the worst-case rows more than 1,000× faster, and the host filesystem code is about 5,300 lines shorter. Where this started Before microsandbox, I'd been working on a distributed filesystem, and I came to this project with specific ideas about storage. The first rootfs I built reflected them: monofs, a content-addressed filesystem with block-level deduplication, compression, and distributed read replicas.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at Hacker News (Newest).