Closed bplasmeijer closed 4 years ago
On an intel i5 9400F @ 2.90Gz + 16Gb RAM + Ubuntu 18.04 WSL2 installed on a NVME drive
Creating ASUS RT-AC68U firmware to image/RT-AC68U_384.17_0.trx
TRX Image:
Total Size .... : 35938304 (35096.0 KB) (34.3 MB)
CRC-32 ........ : 15DC8BE1
[...]
real 23m40.987s
user 34m11.656s
sys 2m48.549s
I didn't notice any slowdown. Before compiling I just call sudo umount /mnt/*
and I get rid of any possible slowdown/conflict with /mnt/ path or binaries.
On an intel i5 9400F @ 2.90Gz + 16Gb RAM + Ubuntu 18.04 WSL2 installed on a NVME drive
Creating ASUS RT-AC68U firmware to image/RT-AC68U_384.17_0.trx TRX Image: Total Size .... : 35938304 (35096.0 KB) (34.3 MB) CRC-32 ........ : 15DC8BE1 [...] real 23m40.987s user 34m11.656s sys 2m48.549s
I didn't notice any slowdown. Before compiling I just call
sudo umount /mnt/*
and I get rid of any possible slowdown/conflict with /mnt/ path or binaries.
The sudo umount /mnt/*
has an huge impact on the build process.
Creating ASUS RT-AC68U firmware to image/RT-AC68U_384.17_0.trx
TRX Image: Total Size .... : 35934208 (35092.0 KB) (34.3 MB) CRC-32 ........ : 5276E5F4
[...]
Hyper-V | WSL2 | WSL2 unmount /mnt/* | |
---|---|---|---|
real | 57m17.494s | 92m53.131s | 25m29.447s |
user | 49m40.129s | 69m45.330s | 38m29.852s |
sys | 5m48.929s | 10m59.973s | 2m56.057s |
cc: @craigloewen-msft
Unmounting /mnt/c made a huge difference. The laptop's Ryzen 5 4500U now is barely slower than the desktop's i7 7700K running VMWare. Here's the results on the laptop:
real 25m16.443s user 37m27.081s sys 3m15.141s
I'll retry just editing PATH instead of unmounting /mnt/c. Makes me wonder if it's really necessary for PATH to include the whole Windows host path by default?
both builds on a clean WSL instance
wsl --import ubuntu-1804-merlin d:\wsl C:\users\bartp\Downloads\bionic-server-cloudimg-amd64-wsl.rootfs.tar.gz
wsl -d ubuntu-1804-merlin
cd $HOME
curl https://gist.githubusercontent.com/bplasmeijer/155ead2a78780ae1639cab1de472be2f/raw/6a5a17aa2844345339e4d2b8eb3a3bdbd6503e34/install.sh -o install.sh
cd amng-build/release/src-rt-6.x.4708/
git checkout mainline
time make rt-ac68u
WSL2 | WSL2 unmount /mnt/* | ||
---|---|---|---|
real | 100m6.521s | 41m16.261s | |
user | 76m55.139s | 59m53.277s | |
sys | 13m6.121s | 5m16.163s | 2m56.057s |
cc: @craigloewen-msft @RMerl
Unmounting /mnt/c made a huge difference. The laptop's Ryzen 5 4500U now is barely slower than the desktop's i7 7700K running VMWare. Here's the results on the laptop:
real 25m16.443s user 37m27.081s sys 3m15.141s
I'll retry just editing PATH instead of unmounting /mnt/c. Makes me wonder if it's really necessary for PATH to include the whole Windows host path by default?
If you have the numbers @RMerl please share.
Unmounting /mnt/c made a huge difference.
That can be configured easily in /etc/wsl.conf
file:
[automount]
enabled=false
[interop]
appendWindowsPath=false
Learn more about it in blog post at: https://aka.ms/wslconf
Unmounting /mnt/c made a huge difference.
That can be configured easily in
/etc/wsl.conf
file:[automount] enabled=false [interop] appendWindowsPath=false
Learn more about it in blog post at: https://aka.ms/wslconf
Not working on WSL2 @craigloewen-msft
Unmounting /mnt/c made a huge difference. The laptop's Ryzen 5 4500U now is barely slower than the desktop's i7 7700K running VMWare. Here's the results on the laptop: real 25m16.443s user 37m27.081s sys 3m15.141s I'll retry just editing PATH instead of unmounting /mnt/c. Makes me wonder if it's really necessary for PATH to include the whole Windows host path by default?
If you have the numbers @RMerl please share.
Sorry, I forgot to try it before uninstalling WSL2 (I'm working on something else on the same laptop that requires VirtualBox, which is incompatible with WSL2).
Anyone else still able to do the same test, just editing the PATH? If not, I'll look into uninstalling VBox/reinstalling WSL2 over the weekend for a quick test.
Unmounting /mnt/c made a huge difference.
That can be configured easily in
/etc/wsl.conf
file:[automount] enabled=false [interop] appendWindowsPath=false
Learn more about it in blog post at: https://aka.ms/wslconf
Not working on WSL2 @craigloewen-msft
It works here. You will need to wsl --shutdown
from cmd after the change. I also used nano to edit the /etc/wsl.conf
file.
Unmounting /mnt/c made a huge difference.
That can be configured easily in
/etc/wsl.conf
file:[automount] enabled=false [interop] appendWindowsPath=false
Learn more about it in blog post at: https://aka.ms/wslconf
Not working on WSL2 @craigloewen-msft
It works here. You will need to
wsl --shutdown
from cmd after the change. I also used nano to edit the/etc/wsl.conf
file.
Please share /etc/wsl.conf
file @onomatopellan , Thanks
It's a very simple wsl.conf. With this Windows folders doesn't appear on PATH. https://gist.github.com/onomatopellan/82474407d6c31076cbd7d6e0ee56e947
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/toolchains/crosstools-arm-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/bin:/opt/toolchains/crosstools-aarch64-gcc-5.3-linux-4.1-glibc-2.22-binutils-2.25/usr/bin:/opt/toolchains/crosstools-arm-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin:/opt/toolchains/crosstools-aarch64-gcc-5.5-linux-4.1-glibc-2.26-binutils-2.28.1/usr/bin:/opt/brcm-arm/bin
Maybe as one last datapoint from me: doing the same build under Virtualbox:
real 30m6.395s
user 40m24.860s
sys 5m36.421s
So on this laptop, WSL2 is clearly faster than VBox when compiling a fairly large project (after taking care of the path issue).
I guess this issue can be closed now. The recommended solution is to edit /etc/wls.conf to disable adding the Windows search path to the PATH variable - doing that fully resolved the performance issues for me.
Please fill out the below information:
Your Windows build number:
Microsoft Windows [Version 10.0.19613.1005]
What you're doing and what's happening:
I am building the Asus Merlin firmware on WSL2 Ubuntu 18.04, and the gap between building on Hyper-V vs WSL2 is to big I think.
Intel(R) Core(TM) i7-6500U CPU @ 2.50GHz
I did expect better performance on WSL2 against Hyper-V.