Hi all. I’ve run into some serious performance issues with WSL2 on my laptop. It has an AMD Ryzen 7 4700U 8-core CPU and 16GB of RAM. It also runs up-to-date Windows 10 Pro.
I set up Ubuntu 22.04 LTS and the freeCodeCamp repo locally by following the contribution guidelines almost to the letter. While WSL always slowed down significantly when I was coding my PR, running
pnpm run test completely freezes WSL 100% of the time.
So far, I’ve tried the following solutions, but none of them has helped in any meaningful way:
- Closing all other applications, so that only Docker Desktop and Windows Terminal are running in the foreground.
- Increasing the size of Windows paging file to 1.5x - 3x that of my physical RAM.
- Dual-booting Ubuntu and Windows. Sadly, Ubuntu has poor support for my laptop’s hardware. The entire system froze every 15 minutes. There were multiple critical issues in the log viewer. I didn’t want to spend days troubleshooting them all, so I gave up.
- Upgrading to Windows 11, hoping for better WSL integration. Ironically, Windows 11 couldn’t even find the
wslcommand and threw some cryptic error messages about the .NET framework.
- Rolling back to Windows 10 and performing a clean reset. This time, I installed only the software necessary for freeCodeCamp development. I also upgraded WSL to 2.0.4 pre-release and enabled
autoMemoryReclaim. Again, neither
dropcachemade any difference.
So it seems I’m stuck with Gitpod at the moment. But Gitpod has its own challenges, namely, port forwarding with Jest snapshots. I’m still struggling to figure it out and procrastinating by writing this post…
Have you had similar issues with WSL? How did you solve it? And if WSL is working smoothly for you, how much physical RAM do you have?
Thanks for reading. Any input is greatly appreciated!