-
Notifications
You must be signed in to change notification settings - Fork 823
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
WSL 2 slow startup (~10s from cold start) #6765
Comments
Spiritually dupe #5289 unless something else particularly stands out when comparing the |
Virtio9p (the PCI prints) does take a bit longer than the hvsocket-based 9p. It looks like you also have the GUI apps package installed which does make boot a bit slower. We're working on resolving both of these. |
@xquangdang - Could you try this on the most recent insider build with the updated wslg package? |
FYI ! with systemd-genie systemd-analyze "blames" 2 critical paths:
|
@benhillis I afraid to find at the bottom of the pit the SSD may start in a portion of ms, GPU with its cooling system in a portion of seconds, AC/XS WiFi adapter in seconds. Unfortunately, Windows unlike Linux doesn't keep track of subsystems startup time. 😂 |
@benhillis Yet another critical path detected is LVM startup time. But it looks like a known problem with Kernel 5.10 ad some "Native" Linux distro like Suse and Fedora. WSL2 may need it for wsl -- mount and it is dup for slow mounted via wsl --mountdisks. |
Does someone need some more investigation about this ? I see 40 seconds between startup and prompt. Hardware is 9900k with 128GB RAM, 6 local drives and few network mounts.
|
same here, > 1 min to get the prompt at first start!
|
Same here. Look at the delay in the unshorted output of
|
Surprisingly, in my case, addressing the I still see about ~40s between the addition of the swap and the It would be great to understand why that 40s delay is there, for sure. |
Thanks for the hint with the network share! After enabling the Network-Share server the startup of wsl2 takes only 5.8 seconds! Did you figured out how you can ignore only one specific drive for automount? As far I can see, you are only be able to completely disable automount for all drives. Also I will give the |
How did you enable the Network-Share server? Edit: Do you mean that after enabling the server that serves your network mapped drive wsl2 started to boot faster? |
Yes, exactly. I booted my local server which acts as a smb-share. After that, the wsl startup was much faster! Currently I disabled |
I guess, it would be great if mounts would not pause the WSL boot process. |
Seems like issues with This comment explains how to disable |
I disabled |
Is seems like the issue is related to network drives. I have business machine which has few mapped drives. When I'm at work WSL start within 4 sec. When I'm at home and all my work drives are unavailable it starts in 50 sec. When at home connected to VPN (drives are online) again it starts in 4 sec. I have disabled automount in wsl.conf. Using Debian distro in WSL. |
I am also experiencing slow startup times. If mounting of
|
I bought Ryzen 5800X3D thinking it will speed things up. Sometimes it feels like stuff got slower than it was back in XP times, Or Windows 2000 when I got my Pentium 4 it was flying now you buy latest and greatest and everything is still slow, like all computers became gaming consoles... Exactly same issue around ~10s from cold start, world is unfear you can't fully switch to linux and same time can't live in windows, why life always has to be a dilema? |
I have exactly the same behavior! I can add that it also applies to FileExplorer which remains unresponsive at first launch in the similar situation. It's incredible that mount trials can't be done in background , letting the main process responsive and usable even if this fails. |
I'm not sure if it's related, but disconnecting inaccessible mapped network drives solved it for me. Here's an issue -> #9358 |
Again, this is not a solution, but a workaround with tradeoffs. |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Expected behavior
WSL 2 start really slow on my new machine with a Ryzen 7 4800H and 16GB of ram. My prev machine with core i7 8750H start wsl2 almost immediately (~1-2s).
Actual behavior
WSL 2 startup took too long, ~8-10s. If I just leave the Windows terminal open with 1 WSL 2 tab for a few mins, create a new tab that took about 4-5s.
Environment
Microsoft Windows [Version 10.0.21343.1000]
WSL logs:
The text was updated successfully, but these errors were encountered: