Skip to content

Instantly share code, notes, and snippets.

@davidwincent
Last active December 20, 2018 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidwincent/dc91241f1b158d7d590c77f4ad3da2ab to your computer and use it in GitHub Desktop.
Save davidwincent/dc91241f1b158d7d590c77f4ad3da2ab to your computer and use it in GitHub Desktop.
Improve file system performace in WSL / WLinux

File system performance in windows subsytem for linux is still a bit mediocre. As an example I tried running git checkout on a medium/large open source project. No download times are included in the tests.

Steps to reproduce test:

$ cd ~/

$ git clone git@github.com:umbraco/Umbraco-CMS.git

$ cd Umbraco-CMS

$ rm -rf *

$ rm .*

$ git checkout -b clean && git add . && git commit -m "clean"

$ time git checkout dev-v7

Results All tests where run on the same host machine. This is my output from running $ time git checkout dev-v7 in the home folder on 3 different setups.

All setups had the following git config:

$ git config --global core.preloadindex true

$ git config --global core.fscache true

$ git config --global gc.auto 256

Setup 1 Ubuntu server 18.10 running under hyper-v with Linux filesystem on mounted .avhdx drive. git version 2.19.1

real	0m0.373s
user	0m0.204s
sys	0m0.168s

Setup 2 Git for windows bash git version 2.19.2.windows.1 (symlinks enabled)

real    0m3.437s
user    0m0.000s
sys     0m0.015s

Setup 3 WLinux (windows defender realtime protections: on, no folder exclusions) git version 2.19.2

real	0m41.530s
user	0m0.500s
sys	0m4.484s

Setup 4 WLinux (windows defender realtime protection: on, exclude folder %LocalAppData%\Packages\WhitewaterFoundry.Co.xxxxxxxxxxxxxxxxxxxxxx) git version 2.19.2

real	0m7.413s
user	0m0.438s
sys	0m3.063s

Setup 5 WLinux (windows defender realtime protection: off, exclude folder %LocalAppData%\Packages\WhitewaterFoundry.Co.xxxxxxxxxxxxxxxxxxxxxx) git version 2.19.2

real	0m3.521s
user	0m0.281s
sys	0m3.156s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment