3 Gotchas with WSL 2 around Disk Space, Memory Usage and Performance

Опубликовано: 05 Октябрь 2024
на канале: Nick Janetakis
42,922
1k

We'll identify and fix a few WSL 2 issues that'll likely cause you issues over time.

Hit the subscribe button to receive more videos like this!

---

Timestamps:

0:00 What we'll cover in this video
0:30 Combating poor file performance in WSL 2 when accessing mounted drives
2:38 Ensuring WSL 2 doesn't use up to 80% of your system's memory
6:17 Clearing out WSL 2's memory usage on demand with a Bash alias
8:21 Reclaiming disk space that WSL 2's VM won't free up by default
10:12 Be careful because WSL 2 won't auto-mount your external drives
12:56 How to shrink your WSL 2 VM to reclaim disk space in PowerShell
18:10 An alternative to the Optimize-VHD command on Windows 10 Home
19:10 Recap and hopefully Microsoft fixes these issues in future WSL 2 patches

Reference links:

https://github.com/microsoft/WSL/issu...
https://github.com/microsoft/WSL/issu...
https://github.com/nickjj/dotfiles
https://github.com/nickjj/dotfiles/bl... (drop cache alias)
https://github.com/microsoft/WSL/issu...
https://github.com/microsoft/WSL/issu...
   • A Linux Dev Environment on Windows wi...   (Windows / WSL 2 tools I use video)

---

Follow along?

Personal Website: https://nickjanetakis.com
Twitter:   / nickjanetakis