Hacker News new | past | comments | ask | show | jobs | submit login

Do you specifically mean \\wsl$ is much faster on WSL2?



  time grep -ri asfadsfadfg /home/me/python-venvs
  0.79s user
  0.14s system
  99% cpu
  0.928 total

  wsl time grep -ri asfadsfadfg /home/me/python-venvs
  0.83s user
  0.10s system
  99% cpu
  0.932 total
EDIT: cleaned up and formatted the output for better visibility, reacting to your comment.

First command ran from a zsh Terminal session in WSL

Second one ran from a powershell session using the wsl "bridge" executable.


I can't make sense of your command lines (why are you passing grep to grep??), but you're comparing pure-Windows against pure-WSL? I was comparing the two of those against \\wsl$ which is the slow one...


Any interaction with the linux filesystem.

With WSL 1 installing an Ubuntu package or performing an upgrade was unbearably slow, with WSL 2 it feels normal.

\\wsl$ is also much faster, yes


Normal interactions from within WSL of course feel normal. It's just a VM with a fancy name after all. Which is removing pretty much all the overhead of the Windows I/O system, and which has hence been faster for ages. I'm surprised \\wsl$ would be faster though; that should have more overhead going through a VM, not less. If I ever try out WSL2 I'll have to give it a shot, but somehow my past experiences don't leave me optimistic...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: