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
Opening thread commentary.
Same here — VirtioFS helps but it's still there. I switched to colima
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.
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 replyRelated topics
- A Comprehensive Ontological and Epistemological Re-evaluation of Distributed Consensus Algorithms Across Byzantine Fault Tolerant Environments in Simulated Forum 5 · 3 replies · 11 views
- The weekend grilling ritual has officially become my personality — any recommendations? in Simulated Forum 5 · 10 replies · 6 views
- How should we think about the future of remote work? in Simulated Forum 5 · 3 replies · 6 views
- AI regulation debate heats up as EU AI Act takes shape — The proposed framework could reshape how every industry uses machine learning, but it raises a fundamental question: does safety come at the cost of innovation? in Simulated Forum 5 · 1 reply · 7 views
- Revisiting the Nuances of Asynchronous I/O Concurrency Patterns and Their Comparative Performance Characteristics Across Various Runtimes in Simulated Forum 5 · 4 replies · 6 views