-
Notifications
You must be signed in to change notification settings - Fork 839
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
Performance accessing WSL2 instance via localhost is dismal #5069
Comments
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! |
Okay. I guess down you can now narrow it down to something to do with using localhost rather than the IP address. Hope it helps and hope it gets fixed soon. |
@pds2208 you are right, when accessing localhost be it through alias or IP address, it is dead slow, accessing through network is fast, so if you do ifconfig in WSL, find out your IP address then access through that IP address then it's all good. Problem with that 1) I've got to serve apps on 0.0.0.0 2) I have to look it up on DHCP change. |
Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.
If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.
Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to [email protected]. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".\
See our contributing instructions for assistance.
Please fill out the below information:
ver
at a Windows Command Prompt)10.0.19041.173
Doing a large number of network request to a WSL 2 instance using 'localhost' is around > 10 times slower than access the instance via its IP address. For example, a large number of inserts into a database running either directly in WSL or via Docker. See https://www.reddit.com/r/bashonubuntuonwindows/comments/fxe3wu/postgres_in_wsl2_performance/
There should be no performance difference between localhost and the WSL2 instance IP address
Strace of the failing command, if applicable: (If
some_command
is failing, then runstrace -o some_command.strace -f some_command some_args
, and link the contents ofsome_command.strace
in a gist here).For WSL launch issues, please collect detailed logs.
The text was updated successfully, but these errors were encountered: