fsharp-language-server icon indicating copy to clipboard operation
fsharp-language-server copied to clipboard

Huge performance issues after some time running

Open resolritter opened this issue 6 years ago • 1 comments

Disclaimer: I'm not 100% sure it's actually coming from the server, but it's the common cause of slowdowns I've noticed throughout the past month.

OS: Linux (Ubuntu 18.04)


Here's what I found from the logs:

14:41:44  FSharpLanguageServer Information: 0 :
14:41:44  Reactor: 52,900.824 BAD-BG-SLICE: >10s <-- background step, took 37954.3431ms
14:41:42  FSharpLanguageServer Information: 0 :
14:41:02  Reactor: 52,862.532 --> background step Unknown.ImplicitlyStartCheckProjectInBackground.CheckProjectInBackground 
14:41:02  FSharpLanguageServer Information: 0 :
14:41:02  Reactor: 52,854.629 BAD-BG-SLICE: >10s <-- background step, took 11142.891ms
14:40:57  FSharpLanguageServer Information: 0 :
14:40:43  Reactor: 52,843.414 --> background step Unknown.ImplicitlyStartCheckProjectInBackground.CheckProjectInBackground 
14:40:43  FSharpLanguageServer Information: 0 :
14:40:43  Reactor: 52,835.035 BAD-BG-SLICE: >10s <-- background step, took 39659.0927ms

After I leave an instance running for past 30 minutes or so, my computer starts to become sluggish and keeps slowing down progressively, eventually reaching the point where I have to hard-reset it because it literally freezes. This has happened multiple times, but I was (arguably I'm still) trying to find out what is truly causing this massive lag to happen.

The above log is what's caught in the system's journal log before the point where I have to restart the computer; furthermore, given that fsharp-language-server was open throughout all those times and I haven't seen the computer act like that unless it's open, I think I have a good shot at solving this if I ask here first. I'd like to know more about what's happening there and how I could possibly move forward with this problem. Thank you in advance.

resolritter avatar Sep 07 '19 15:09 resolritter

I'm running into this, I created a minimal repro here. It looks like reactor goes crazy if there are more than 2 project references, without interacting with the editor. I'm seeing 100% core usage swapping between 2 cores which goes away once I stop the server: image

gsuuon avatar Sep 26 '21 17:09 gsuuon