Memory usage has also gone bonkers with the VM approach, causing unnecessary overhead for casual users who don't need performance.
Memory usage has also gone bonkers with the VM approach, causing unnecessary overhead for casual users who don't need performance.
This is about my only issue with WSL2, but it's a big one. Perhaps worse than this being a problem is that Microsoft don't seem to be providing any solutions - there are various GitHub issues about it, with non-Microsoft ransoms being the ones providing workarounds (but these depend on your environment - I haven't found any way to get this working myself!).
WSL1 was very ambitious. AFAIK, the main reason for shelving it's approach was filesystem performance. While it was indeed slower than native/VM, I personally never found it troublesome outside of artificial benchmarking. For the vast majority of use cases, WSL1 worked well, with Docker being the only real thing missing, IMO.
Obviously this is only re: fs perf, I can't speak to your other issues which do seem quite challenging. But I can definitely understand why they would have seen fs perf as a priority.
bash inside mintty gives me all I need, with minimal overhead.
Eventually, I'd like to see bash inside Windows Terminal made easily available - complete that with busybox, and you cover 90% of the Linux usecases without having to download anything (a bit like how starting Terminal.app offers most of what you need on MacOS)
Add an option to install packages using msys2/pacman for the power users, and I believe most people would not waste time (or disk space, or ram) playing with WSL1 or WSL2 just to run the one thing they may need.
msys2 mostly cares about running your textmode software.
For example, someone talked about processes. Here's all that I see in msys2:
# ps xwau
PID PPID PGID WINPID TTY UID STIME COMMAND
480 479 480 18796 pty1 197611 14:13:13 /usr/bin/bash
479 1 479 16872 ? 197611 14:13:12 /usr/bin/mintty
1118 480 1118 16496 pty1 197611 17:00:32 /usr/bin/ps
Most of the time, I don't need to access Windows processes - and if I do, data can be exchanged through a file. shawnz@ShawnsPC:/mnt/c/Users/shawn$ ps xwau
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 8936 184 ? Ssl Nov17 0:00 /init
root 6 0.0 0.0 8936 96 tty1 Ss Nov17 0:00 /init
shawnz 7 0.0 0.0 18588 2708 tty1 S Nov17 0:00 -bash
shawnz 252 0.0 0.0 18880 1984 tty1 R 18:04 0:00 ps xwauI can only recall it was a dialog box, not a crash, and that it had to do about virtualization.
export WINHOST=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}')
Because the Linux VM in WSL 2 is a "different" computer, mostly, according to Windows, there may be firewall trouble, I suppose.That doesn't seem impossible to implement. Can't you connect to some port on your gateway to access the host? Even if you currently can't, it still seems pretty easy to implement in the grand scale of things, than trying to make WSL1 work.
I'd imagine it is in some todo list somewhere in Microsoft
I'm not confident about diving into WSL2.
https://www.reddit.com/r/bashonubuntuonwindows/comments/d8x7...
"So, I was copying a 8GB file to my Debian home folder using Windows Explorer, via $wsl network. The copy process made my CPU's fan runs like a jetplane, and it stop copying when at 95%, then I opened up Task Manager and saw this.
even after it finish copying, Vmmem process still hold 13GB RAM and not release any. Why? I have to shutdown WSL after copy a big file?
Answer:
Very normal but annoying issue. ... The only solutions are:
a) a kernel change by MS to limit the amount WSL2 can cache b) disable to caching ( nocache ) c) Put a limit on the WSL hyper-v VM
Not sure what or how MS will try to solve this issue... WSL1 did not have this issue, because it shared the main system memory, because it was just a layer around the NT kernel."
https://devblogs.microsoft.com/commandline/memory-reclaim-in...