-
Notifications
You must be signed in to change notification settings - Fork 858
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
git status slow on DrvFS #981
Comments
Thanks for the feedback! There are some known issues with file system performance. We go into a little detail on our implementation on our Blog and that should shed a bit of additional light on the situation. Also, there are some discussions on filesystem performance (my favorites are #873 and the Phoronix article from a while back). This is not an easy problem, but it is something we are working diligently to improve. Unfortunately I can't give an ETA, but we do have some things in the pipe which will have some impact. |
I did see #873 as well, but my issue is different, as it occurs anywhere in the filesystem, not just under |
It appears to be a problem with VolFs (/home/me/chromium/src) not captured by the Phoronix tests. If you checkout say the chromium tree with all branches and do a |
Updated the title because the original made cause assumptions, and many other issues have been duped into this one. |
While my title may have been inaccurate, I don't think that "git status is slow" accurately describes the problem either, as it is just a symptom of the problem |
Indeed. The new title merely follows the guidelines of CONTRIBUTING.md (example given: "traceroute not working"). It summarises the nature of the repro given in the OP, and is actionable. Presumably this issue# would be closed when the performance of |
Has there been any recent progress on this? I'm experiencing crippling performance (> 30s) when running |
@piksel You're the best! How did I not think of this before. |
@jakeg - We are constantly looking at ways to improve disk perf and are making regular investment in that space. If there is anything significant to report, we will. For best updates, you can monitor the WSL release notes here. We understand the ask here. Please bear with us here as this is a major undertaking. |
Here is an alternative script to @piksel just in case someone is using symlink directories like me. #!/bin/bash
# WSL 'git' wrapper, save as /usr/local/bin/git and chmod a+x
REALPATH=`readlink -f ${PWD}`
if [ "${REALPATH:0:5}" == "/mnt/" ]; then
git.exe "$@"
else
/usr/bin/git "$@"
fi |
The bash script wrapper is good, it's fast. The one thing I'm now missing is console colors, is there a fix for that? |
@er1c This is not related to WSL per se, so kind of off topic, but you can force git to use colors with either git log --graph --color=always |
You can run the following commands to get colors working, depending on what you want to colorize. I am running the windows version of git with coloring and love the speed up. |
@therealkenc - If only that was the way big org's worked ;) @GenesisCraig - Appreciate your input, but as I (often) recommend, lets limit "pontification from the sidelines" esp. in relation to commentary on teams one is not involved with and/or have no knowledge of how said teams operate. If it was as simple as "throw a couple of devs at it", the problem would be fixed by now. Know that the team is painfully aware of these issues, and is working hard with several partner teams with the specialist knowledge, understanding, skills, and mandate to work on the relevant improvements in up-coming releases. We are passionately committed to resolve this issue given time to work through the highly complex changes required. |
Sounds like you just don't want it enough! I kid, I kid ;) Awesome work. Can't wait to see this all come together. |
@bmayen Bwaahhhahahh! |
To be clear, it was completely in jest. There isn't anything to "agree" with me here. If thought it worked like that I would be on a private island, having earned $2.5b for banging out a game with crappy voxel graphics in Java. |
@er1c I've found the lack of paging on git log to be a problem also. Forgive my lack of "bash-fu" but I came up with this as an interim hack:
|
This problem has plagued me for quite some time. The workaround I've opted for is to limit my working directory by setting Though not ideal, working with massive repos is often inevitable, and it may not always be possible to break them down into smaller repos for political and/or convenience reasons. If I find I work on a large enough portion of the repo that sparse checkout doesn't bring performance within a reasonable range, I'll clone multiple copies of the repo with more aggressive sparse checkout settings, a separate copy for each "context" I'm working in. Additionally, it helps to run I'm excited for the filesystem IO issues in WSL to be worked out, as it will make windows a significantly more pleasant development environment. It seems to be a likelier outcome than Linux desktop supporting various Windows/Mac -only software I need, not to mention more affordable than switching to mac hardware. |
Thanks everyone. Was facing this exact problem. the git.exe solution here is really good and give me back my performance. But getting ssh works with git was troubling me. so my solution is with putty's pageant.
|
For those who're interested in WSL's disk IO perf challenges, you may be interested in @SvenGroot's awesome writeup over in the main issue tracking disk perf issues (#873) |
Has anyone else noticed a huge regression in speed since the October Update? Linux git was borderline tolerably slow before the update but now it's unbearable. It could absolutely be a problem on my end, especially since I didn't see anything about WSL in the changelog. |
Here is my solution using ssh-agent instead of plink to solve the issiue with existing ssh keys for wsltty/mintty terminal Add the following to ~/.bashrc, do not forget to replace
And of course use git wrapper mentioned above |
Did something change in the last few days? My performance on mounted drives for file io commands like git went from the expect slow to almost as fast when they are run in the WSL directory. |
@mkarpoff That's interesting. Are you on insider's build? I'd like to try out too. |
I'm on slow ring build 17763.253. I think it might have to do with windows defender getting updated because I got some updates to it. |
@mkarpoff I'm on the same build as yours. My feelings are it's much faster than what it used to be, but still not as fast as on native linux. |
So I did some VERY BASIC benchmarking with a git repo. I cloned the same repo on 4 different machines. My laptop (windows +WSL ubuntu 18.04), a university server(ubuntu 16.04), a university lab computer (ubuntu 16.04), and my own personal server from cybera (ubuntu 18.04). I don't have the specs for allot of these machines but I know the hardware is very different so take all of this with some salt. I cloned the repo onto all the machines in the windows case I cloned it into my "Documents" folder as well as in the WSL home folder. I then ran WSL Home: 0.032 s This does show that WSL it is still slow relative to native linux this command used to take around 0.100s - 0.200s in the Documents directory for me so I'll call that a huge win. I should also mention that this is win Windows Defender and OneDrive running and OneDrive is set to backup the "Documents" directory. |
@mkarpoff how large is your project? |
It's very small only 300 KB |
Consolidate #873 |
Using the git.exe from WSL has greatly accelerated the work. |
Just ran into this on a brand new WSL2/ubuntu setup with the latest builds and versions, so painfully slow I managed to search and find this as an FYI i was using the exact same working directory setup before on WSL1 on an older windows10 build with linux git working on files on a /mnt/c/ directory and i never noticed any issues whatsoever.. |
I don't believe this is specific to git, but it exposes the problem nicely.
To do this test, I cloned Mono to
/mnt/c/mono
When running
time git status
on WLS:However, if I run the same command on Git Bash for windows, it runs significantly faster:
This problem is not related to the
/mnt
folder, as I get similar runtimes in~/
. I don't have an antivirus or firewall running (including Windows Defender).I've also run
bonnie++
to test my HD speed:I believe the problem lies with random seeks per second. I've run the same command on a different linux box with an SSD (my personal machine has an SSD as well), and I'm getting about 10 times less random seeks (but equivalent of everything else). I've confirmed this theory by running
dd
on both Git Bash and WLS, and I get roughly equivalent numbers there as well.I'm running on Windows Version 1607 Build 14393.82
The text was updated successfully, but these errors were encountered: