-
Notifications
You must be signed in to change notification settings - Fork 113
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
High CPU use with WSL #182
Comments
Is it the |
Weird. I can only imagine it's the file watching code going nuts, or GC making a freak out, but with only 1.2Mb active mem GC seems unlikely. Can you reproduce it? |
It seems to happen every time I launch |
Can you launch with |
With
|
How frequent are they? How many lines/sec while idle do you see? |
Does |
I think those incrementing numbers are seconds so it looks to be in the order of 100 per second. Unfortunately it seems I haven't compiled in support for |
I realised this is under WSL rather than a Windows native binary. The plot thickens. |
Any news on -I0? That's easy to fix and used to be an issue with Shake. |
Haven't tried yet, sorry. |
I have also ran into this issue under WSL. Trying to run with Btw, may be relevant: I have observed this issue when using WSL GHCid with NTFS ( |
I've recompiled GHCid with I've also tried
Here is the last summary I got after ctrl+c with
Is that helpful? Any next idea @ndmitchell or @tomjaguarpaw? |
Is that helpful? Any next idea @ndmitchell or @tomjaguarpaw?
I'm afraid I haven't made any progress debugging this and I don't know where
to start!
|
The fact most of the time is in MUT suggests if you compiled with profiling and ran it might tell you what where the time was going in the profile. I'd recommend that as the next step. @tomjaguarpaw - are you on WSL? Windows? @Wizek - does this happen for all projects or just one? Which GHC version? |
On Wed, Aug 29, 2018 at 03:27:09PM -0700, Neil Mitchell wrote:
@tomjaguarpaw - are you on WSL? Windows?
Yes, I'm on WSL.
|
See #121 (comment) - seems a more recent WSL has improved things. It also reminds me that if you are having issues, |
I can quickly comment that I dimly remember having observed the same high CPU use with I'm also glad to read that this may be improved in an windows insider build, I'll attempt to verify that. |
Just checked: |
Profiling done: https://gist.github.com/Wizek/f520108a5282aefb9333bca081fd565d Does this give you any ideas? Next up: might be trying the insider build. |
Verified, insider build 17744 works well! Tried 2 combinations: editing files from a WSL editor vs a win32 editor; both on NTFS, both without poll, both picked up file changes and both work without excess CPU use. Wonderful! For the sake of my curiosity, if one of you can tell me if you can make any sense of my attached prof file, I would appreciate knowing what was going wrong in the stable builds. Also, it may take months before this fix lands on stable. |
Unfortunately that profile is garbage, it says that it spent 100% of the time executing main which is |
doesn't that just mean that the profiled build is lacking the -fprof-auto (or related flags) in the right places (the right deps)? |
Probably @lspitzner - I confess I've never tried generating a profile without setting the flags first. My standard flags are |
ghcid on Windows was constantly using 25% CPU (which I guess is all of one core but I'm not certain) even when there were no changes to any files that it's watching. Is there anything in particular that I should be tweaking?
The text was updated successfully, but these errors were encountered: