Skip to content
Tech · 2 min read

Why Ubuntu felt faster than Windows for development

Same hardware, same apps. After moving to Ubuntu, Docker, builds and npm install felt noticeably quicker. Here is what I think is going on, and what I measured versus what I only felt.

I recently moved from Windows to Ubuntu on the same hardware, running the same applications. Windows could do the job. Ubuntu just felt faster and smoother, especially for development, Docker, builds and anything that touches a lot of files.

After digging in, I don't think the answer is "Linux is faster." It is more specific than that.

The layers

On Windows, a typical container workflow looks like this:

Windows → WSL2 → Linux → Docker → filesystem boundaries

On Ubuntu it is:

Linux → Docker → Linux filesystem

WSL2 runs a real Linux kernel, and Microsoft has done good work on it. The cost shows up at the boundary. When your project lives on the Windows side (/mnt/c/...), every file operation from Linux crosses into Windows over the 9P protocol. Tools like npm install, git status and Docker builds touch thousands of small files, so that latency adds up quickly.

It is not only the filesystem

Windows Defender real-time scanning is another big factor. Developers have reported dramatic speedups on small-file workloads with it turned off, and excluding folders does not always fix it, because package managers also write to caches outside the excluded folder.

So the slowness I noticed with npm install and pip install is probably a mix of:

  • NTFS and Windows file-system overhead on many small files
  • Real-time antivirus scanning
  • The Windows-to-WSL filesystem boundary, if the code is stored on the Windows side

What helps if you stay on Windows

  • Keep your projects inside the WSL home folder, not under /mnt/c
  • Use Docker Desktop's WSL2 backend with code stored in WSL
  • Check what Defender is scanning during installs and builds

What I measured and what I did not

Honest note: my comparison so far is a feel, not a benchmark. The next step is to time npm install and a Docker build on both systems with the same project and a cold cache, and post the numbers here.

A bigger question

It made me wonder whether Microsoft might one day build Windows on a more Linux-like foundation, keeping compatibility for enterprise users while giving developers a cleaner base. I don't know of any plan like that, and a different kernel would not remove the real constraints: drivers, legacy enterprise software and decades of compatibility.

  • Ubuntu
  • Windows
  • WSL2
  • Docker
  • Developer tools