Skip to content
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 WSL2 - munmap call is extremely slow #6743

Closed
Johnlon opened this issue Mar 31, 2021 · 2 comments
Closed

git status slow on WSL2 - munmap call is extremely slow #6743

Johnlon opened this issue Mar 31, 2021 · 2 comments

Comments

@Johnlon
Copy link

Johnlon commented Mar 31, 2021

See also issue 4401

Windows 10 Pro - 10.0.18363 Build 18363
git version 2.17.1
Linux 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Running git status is VEEY slow on WSL2 using the ubuntu installed git.
If I run Windows git.exe it is extremely fast.

$ time git status
On branch master
real    0m43.340s
user    0m5.019s
sys     0m4.852s

By contrast git.exe ...

real    0m0.148s
user    0m0.001s
sys     0m0.008s

I ran strace and the slow calls are always the munmap calls - the one below takes over 5 seconds for a 28mb file.

     0.005285 openat(AT_FDCWD, "docs/SPAM1-AVR-Like1.xlsx", O_RDONLY|O_CLOEXEC) = 3 <0.003719>
     0.004075 read(3, "PK\3\4\24\0\6\0\10\0\0\0!\0\252\367X\244y\1\0\0\24\6\0\0\23\0\10\2[C"..., 18623) = 18623 <0.000723>
     0.001076 close(3)                  = 0 <0.001527>
     0.001803 lstat("docs/SimpleCpu-blocks-20200520.pptx", {st_mode=S_IFREG|0777, st_size=28930507, ...}) = 0 <0.003957>
     0.004256 openat(AT_FDCWD, "docs/SimpleCpu-blocks-20200520.pptx", O_RDONLY|O_CLOEXEC) = 3 <0.003864>
     0.004205 mmap(NULL, 28930507, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f689456c000 <0.000209>
     5.308742 munmap(0x7f689456c000, 28930507) = 0 <0.001437>
     0.001832 close(3)                  = 0 <0.006200>
     0.006605 lstat("docs/SimpleCpu-blocks-pre24.pptx", {st_mode=S_IFREG|0777, st_size=203419, ...}) = 0 <0.006016>
     0.006429 openat(AT_FDCWD, "docs/SimpleCpu-blocks-pre24.pptx", O_RDONLY|O_CLOEXEC) = 3 <0.005984>
     0.006427 mmap(NULL, 203419, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f68960d2000 <0.000286>
     0.039276 munmap(0x7f68960d2000, 203419) = 0 <0.000327>
     0.000731 close(3)                  = 0 <0.002919>

Any fix?

Must I resort to using the Windows git.exe instead as described here .. #4401?

@therealkenc
Copy link
Collaborator

/dupe #4401 ➡️ #4197.

@ghost
Copy link

ghost commented Mar 31, 2021

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost closed this as completed Mar 31, 2021
@ghost ghost added the duplicate label Mar 31, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants