-
Notifications
You must be signed in to change notification settings - Fork 832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessing Linux files through \\wsl$ is unbearably slow #4220
Comments
@therealkenc That issue is about WSL2, and has nothing to do with |
One discussion thread for 9p perf, both directions, is plenty. |
@therealkenc Doesn't WSL2 have a completely different architecture (using a lightweight VM)? Are you suggesting that accessing |
@glen-84 - Correct, \\wsl$ in WSL1 and WSL2 both use 9p. In WSL2 9p is also used for Windows drive access (/mnt/c etc). |
Okay, I apologize for the duplicate. |
This worked for me. for my WSL2 distro wsl --set-version distro 1 it will take a few minutes go back to version 2 |
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.18362.175]
Accessing Linux files via
\\wsl$\Ubuntu
, and it's super slow.I did some basic testing with
dd
, and found the following:Write in
//wsl$/Ubuntu
...dd if=/dev/zero of=//wsl$/Ubuntu/home/glen/testwrite.img bs=100M count=1 oflag=dsync
MCAFEE REMOVED:
dd if=/dev/zero of=//wsl$/Ubuntu/home/glen/testlatency.img bs=512 count=1000 oflag=dsync
Read in
//wsl$/Ubuntu
...time dd if=//wsl$/Ubuntu/home/glen/testwrite.img of=/dev/null bs=8k
real 0m15.010s
user 0m0.078s
sys 0m0.265s
real 0m4.251s
user 0m0.031s
sys 0m0.124s
MCAFEE REMOVED
real 0m3.781s
user 0m0.046s
sys 0m0.125s
real 0m3.733s
user 0m0.030s
sys 0m0.140s
Write in
~
...dd if=/dev/zero of=/home/glen/testwrite.img bs=100M count=1 oflag=dsync
dd if=/dev/zero of=/home/glen/testlatency.img bs=512 count=1000 oflag=dsync
Read in
~
...time dd if=/home/glen/testwrite.img of=/dev/null bs=8k
real 0m0.128s
user 0m0.016s
sys 0m0.094s
real 0m0.132s
user 0m0.031s
sys 0m0.109s
Write in
/mnt/c/Users/Glen
... (from distro)dd if=/dev/zero of=/mnt/c/Users/Glen/testwrite.img bs=100M count=1 oflag=dsync
dd if=/dev/zero of=/mnt/c/Users/Glen/testlatency.img bs=512 count=1000 oflag=dsync
Read in
/mnt/c/Users/Glen
... (from distro)time dd if=/mnt/c/Users/Glen/testwrite.img of=/dev/null bs=8k
real 0m0.127s
user 0m0.000s
sys 0m0.125s
real 0m0.122s
user 0m0.000s
sys 0m0.125s
Write in
/c/Users/Glen
... (from Windows)dd if=/dev/zero of=/c/Users/Glen/testwrite.img bs=100M count=1 oflag=dsync
dd if=/dev/zero of=/c/Users/Glen/testlatency.img bs=512 count=1000 oflag=dsync
Read in
/c/Users/Glen
... (from Windows)time dd if=/c/Users/Glen/testwrite.img of=/dev/null bs=8k
real 0m0.105s
user 0m0.000s
sys 0m0.061s
real 0m0.092s
user 0m0.015s
sys 0m0.046s
TL;DR:
\\wsl$\Ubuntu
/home/glen
/mnt/c/Users/Glen
/c/Users/Glen
(from Windows)😞
It needs to be a lot faster in order to be useable.
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).n/a
n/a
The text was updated successfully, but these errors were encountered: