NovFora Dev

Is anyone else seeing increased latency with Docker Desktop on M2 Macs? The VirtioFS backend seems to help but I'm still hitting ~50ms for simple file reads inside containers compared to native speeds. Has anyone managed a stable workaround or found

Ethan Hughes

Ethan Hughes

5 months ago

Opening thread commentary.

Grace Adams

Grace Adams

5 months ago

Same here — VirtioFS helps but it's still there. I switched to colima

Stella Richardson

Stella Richardson

5 months ago

The VirtioFS backend should bring this down to <5ms for most workloads, so 50ms suggests either your builder cache is thrashing or there's a specific shared volume pattern causing rebinds. Check docker stats --format '{{.Name}} {{.MemUsage}}' during the slow op — if memory spikes you have swap pressure.

On M2 specifically, I've found that bind mounts to directories with thousands of files (node_modules, vendor/) through gRPC FUSE trigger a massive metadata rebind on every build step. The fix is .dockerignore aggressively and mounting only the specific subdirs you need rather than the root project dir.

Also worth checking: docker builder prune --unsafe occasionally clears up stale mount cache that VirtioFS doesn't properly release between builds.

James Rogers

James Rogers

4 months ago

Yeah I've been fighting this exact thing since Docker bumped to 4.17 on my M2 Pro. VirtioFS is definitely a step up from gRPC FUSE (I went through it last quarter and can confirm the difference is night and day), but that ~50ms per read is still wild for something like npm install or compiling Go binaries in the container where you're doing millions of small file operations.

What I found that actually moved the needle: move your build directories to a named volume rather than mounting from the host filesystem via VirtioFS. So instead of -v ~/projects/app:/src, do something like -v my_build_cache:/tmp/build and run

Join the conversation to leave a reply.

Sign in to reply

Related topics