Running coding-agent workspaces on shared hosts and versioned storage

Why co-located workspaces stall on syncfs(2), how a durability-matched control finds it, and how to give agents Git tools over a store that is not Git.

August 20263 min readPerformanceStorageAgent systems

Dense short strokes of brick red and slate cover a dragged sand underpainting, sagging along a darker middle pass, with abrupt chalk swipes and one cobalt touch.

Put 21 coding-agent workspaces on one Linux host and each can run more than five times slower than it does alone, with nothing failing, the NVMe drive below saturation, and most CPU cores idle. Packing workspaces onto shared hosts and versioned storage is an economical way to run an agent platform while retaining file history, yet agents and their tooling assume a private disk and a local Git checkout. When those assumptions break, the cost rarely surfaces as a clean error; instead, co-located workspaces stall each other on disk, or an agent burns turns looking for .git in a tree that never had one.

Blaming the hardware or adding another paragraph to the system prompt treats the symptom. Finding storage contention takes a control matched on durability, and running over a non-Git store means giving agents the repository interface they know while stating plainly where the workspace differs.

I dealt with both on a platform running coding agents on shared Linux hosts. Each working directory is served over FUSE by a per-workspace daemon, owned by another team, that keeps file contents in a content-addressed store and preserves every revision. My part was the diagnosis, the host storage layout, and the repository tools on top.

Shared filesystems and syncfs(2)

To separate hardware limits from daemon contention, I ran a deterministic workload of 8,000 files per workspace on an 8-vCPU Linux host with one NVMe drive and a single XFS filesystem. Through the per-workspace FUSE daemons, median completion time rose 5.6-fold from one workspace to 21, reaching 63.9 seconds. Buffered native writes are a misleading baseline because they skip durability, so I matched that property with native writes calling fsync per file. Under that control, scaling from one workspace to 21 slowed median completion by only 1.36-fold, confirming the drive could sustain 21 durable writers and putting the slowdown in software.

The bottleneck came from the daemon’s group-commit path. Skipping per-file fsync in favor of a single syncfs(2) before each group commit is a sound amortization when a daemon owns its filesystem, since one flush covers an entire batch of writes. Share one XFS volume across 21 independent daemons, though, and every commit flushes dirty pages for all 21 workspaces. Host metrics reflected that coupling: load average hovered near 21 with only about 2.7 of 8 cores busy, as daemons queued behind kernel flushes instead of saturating CPU or NVMe.

Because another team owned the daemon, I contained the contention in the host storage layout without touching the engine. Moving daemon state and a shared content pool onto two dedicated ext4 filesystems backed by loop devices scoped syncfs(2) off the host volume and separated the two write paths. Loop devices need direct I/O here: buffered loop I/O ran slower than before. With direct I/O enabled, a single post-change run at 21 workspaces on that host and synthetic workload dropped the median from 63.9 to 38.7 seconds. Two dedicated filesystems only bounded cross-workspace flush interference, since co-located workspaces still shared them; the owning team later narrowed the flush inside the daemon itself.

Git at the boundary of a versioned store

The second assumption coding agents bring into a workspace is a local Git checkout. Putting .git inside a versioned store that never prunes history replicates tokens forever and breaks down once a workspace holds several repositories. Clones therefore land as plain files under a per-repository prefix, paired with a record of the upstream repository and base commit.

Leaving .git out of the working tree does not stop an agent from reaching for it. Models already know git and gh, so I exposed the repository tools under those names rather than inventing new ones and fighting the model’s priors in the system prompt. Familiar names only help when the contract is honest, so each tool description lists plainly what does not exist in the workspace, such as worktrees, stash, reset and interactive rebase.

The same rule applies to tool output. Rebuilding an exact Git diff is not always cheap or fresh, so status labels the source of its result: exact from scratch Git against the base commit, cached from an earlier run, or approximate from file names and sizes. When an approximate check finds no changes, it states explicitly that the tree is not confirmed clean.

When the agent exports its changes to GitHub, Git runs at the boundary. Export reconstructs the repository at the recorded base commit in temporary scratch storage, overlays the workspace files for that prefix, and lets Git compute the change set. Because a partial mount leaves files absent from that tree, Git records mount gaps as deletions. To prevent a degraded mount from turning into a destructive commit, export stops if deletions exceed the larger of 50 files or 20 percent of the tracked tree.

Chris Chabot, August 2026