Why WSL2 Slows Down on /mnt/c and How to Diagnose the Real Cause
WSL2 itself is not inherently slow, but file operations that cross the boundary between the Linux and Windows filesystems incur measurable overhead via a protocol called 9P. This cost is most severe for workloads involving many small, discrete operations — such as npm installs or copying numerous small files — rather than fewer large transfers. In benchmark tests, creating 300 small files on the Windows-side filesystem took roughly ten times longer than the same task on the Linux filesystem. Microsoft's own documentation recommends keeping files on the same filesystem as the tools being used to avoid this penalty. Developers can diagnose the specific bottleneck in their setup by tracing syscalls to identify which operations are accumulating cross-boundary costs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in