Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Jane Street Tech Blog 6 min read Case study hardMaster

A FUSE server for our in-house storage backend

Jane Street built an OCaml-native FUSE library, implementing the protocol directly instead of using blocking libfuse via FFI, and used it to expose Depot, its in-house object store, as a read-only POSIX filesystem for research workloads. Pitfalls included sparse protocol documentation, handled by capturing real libfuse traffic as serializer test data, and /dev/fuse requiring exactly one message per read()/write() syscall, which ruled out standard libraries that retry partial writes. Mapping Depot semantics onto POSIX meant shortening names up to 7,000 characters to UNIX-compatible aliases and keying inodes by access path so multiply-referenced bundles look like separate directories. Throughput rose from ~30 MiB/s to 1.3 GiB/s by allowing concurrent reads so kernel readahead could work, and by passing buffers directly instead of copying through OCaml strings, which had caused 92% of allocations.

Related posts

  • Building fast filesystems for VMs

    Modal hardMaster

    Modal replaced virtio-fs with a custom virtio-blk backend, ImageFS-blk, for its VM Sandboxes. Under virtio-fs every metadata operation crosses the VM boundary: one chown cost three guest-to-host FUSE round trips and six host syscalls. ImageFS-blk synthesizes ext4 inode and extent metadata from lazily loaded image metadata, leaves file data sparse, and serves blocks on demand from a tiered cache. Writes go to a sparse file tracked by a dirty bitmap, giving block-level copy-on-write. Metadata operations now stay in the guest's ext4 journal (chown drops from ~99 µs to ~2.1 µs), bun install runs 12x faster (12.5s to 1.07s), and sub-second cold starts are preserved.

  • Speeding up Deployments with Lazy Image Streaming

    Replit mediumAdept

    Replit cut cold-boot times for large Deployment container images from 3-4 minutes to under 30 seconds by lazily streaming images through a FUSE filesystem instead of pulling and unpacking every layer up front. They compared the eStargz snapshotter, which requires converting images to a per-file-compressed seekable format with worse compression ratios, against AWS's SOCI snapshotter. SOCI stores separate zTOC metadata with gzip decompressor checkpoints, so existing OCI images can be range-fetched without modification, and Replit chose it. The main tradeoff is slower runtime filesystem access because every FUSE operation crosses between user space and kernel space several times.

  • What the interns have wrought, 2024 edition

    Jane Street Tech Blog mediumAdept

    Three 2024 Jane Street intern projects get a technical walkthrough. Camels is a pure-OCaml, Polars-like dataframe library that separates expression construction from execution so queries can be compiled, and it uses a phantom-typed length parameter to catch missing broadcasts at compile time. A speed-over-size variant of Binprot drops variable-length integer encoding so adjacent non-pointer record fields can be memcpy'd, built on typerep with custom C bindings; it ran 10-20% to 15x faster than Binprot and cut production tail latencies by 30-65%. A time-travel debugger for the Aria-based Limshare risk-limit system adds periodic snapshots so engineers can step backward through the update log when investigating incidents.

  • AgentFS with FUSE: SQLite-backed agent state as a POSIX filesystem

    Turso mediumAdept

    AgentFS adds an `agentfs mount` command that exposes its SQLite-backed agent filesystem as a real POSIX filesystem via Linux FUSE. Agents and shell tools like git, grep and diff can then work on agent state with no SDK integration. The implementation uses the Rust fuser crate and enables kernel writeback caching, so writes and cached reads hit the page cache and run near native speed. Non-cached reads and fsync() pay the kernel-crossing overhead. Each write is coordinated with a database transaction, and the whole filesystem stays in one portable, queryable SQLite file that can be inspected with sqlite3 or snapshotted by copying it.

  • The File System API with Origin Private File System

    WebKit mediumAdept

    WebKit now supports the File System Standard's origin private file system, a per-origin sandboxed storage area where web apps can create, read, write, move, enumerate and delete files and directories. It is available from Safari on macOS 12.2 and iOS 15.2, has the same lifetime as IndexedDB and localStorage, and is disabled in Private Browsing. Worked examples cover navigator.storage.getDirectory(), getFileHandle/getDirectoryHandle, move(), resolve(), async iteration, removeEntry() and getFile(). Writing in WebKit currently requires FileSystemSyncAccessHandle, which works only in Workers, takes exclusive access to a file, and offers synchronous read, write, truncate and flush for the best performance.

The quest for software engineering knowledge.

Look:
Layout: