HIgh mono-sgen memory usage with latest Rider

Answered

The newest EAP build for Rider seems to, fairly regularly, result in some severe runaway memory usage that makes my machine (2014 iMac with 8gb RAM) practically unusable. The memory usage seems to be associated with the mono-sgen process spawned by Rider (Resharper host?) that I've caught using upwards of 4gb of memory before it locks up my machine. I was eventually able to terminate it, but this has occurred on four separate occasions now and at least once forced me to hard power off the machine.

Has anyone else experienced this problem or have any solutions?

5
13 comments

So having realised this problem was only affecting one project, I cleared out that project's .idea folder and the problem seems to be resolved. Resharper host memory hovers at around 600mb now without guzzling up too much more.

0

Looks like that wasn't a long-term fix, the issue's recurred again. The process was using 6gb before I managed to get a terminal open to kill it. Is there any word on this issue?

0
Avatar
Permanently deleted user

I have same issue with Rider (not eap)  2017.2. Related to mono, I have nursery-size=64m option. Does this cause the issue? If yes, how do I change this?

I just use Web api 2 service project in monodevelop. It only use app. 400MB + mono (app. 60MB).  Same project I opened in Jetbrains Rider. It works, but  eats memory as you see above.  

0

No official comment on this? Or has this been fixed? found mono-sgen was using 1.6GB memory in my project.

0

rider is really eating away all available memory on my ubuntu machine.

1
Avatar
Permanently deleted user

I'm having this issue with 2018.1.  On a small .net core api project on Mac High Sierra Rider is using 1GB and mono-sgen 2GB of memory.

1
Avatar
Permanently deleted user

Still prevalent in 2018.2.1. mono-sgen at very high cpu utilization on Mac, even when Rider is just sitting unused but with an open window and open solution.

1
Avatar
Permanently deleted user

Same here. Using Rider 2018.2.3 on macOS High Sierra 10.13.5 on MacBook Pro Retina 13" early 2015. 

java 1.4GB

mono-sgen 1.31 GB 

no news on this since July 2017? Is this a feature? 

0

Hi all!

Sorry for the delay in answer.

Rider system requirements recomend to have 4GB of RAM or higher for optimal performance. Therefore, 1.5 gb for java and 1.5 gb for mono-sgen is within the normal range.

 

Claudio, could you please clarify what type of project you use and how big is your working solution?

 

Kind regards,

Sofya

 

0

Hi Sofya!

I experience similar issue here (Ubuntu 18.10 fully up-to-date, Rider 2018.2.3 #RD-182.4231.496) - on a relatively small dotnet core (dotnet new classlib, dotnet version 2.1.500, commit b68b931422) project with few dependencies (System.Memory 4.5.1, xunit 2.4.1, Moq 4.8.3) java process consumes 1.2g and mono-sgen 2.2g when I do nothing. However, when I try to run unit tests from within Rider, it spawns some more (1-2) dotnet processes and those also consume 1-1.5g of memory (which is sort-of-expected I suppose).

This itself is not an issue generally (although a bit more than 4g), but sometimes (I don't know what causes that, it usually happens when I start tests and switch to another memory-intensive application like chrome to look at cat gifs) mono-sgen can suddenly expand to 3+g hogging whole remaining free memory and pushing me into swap, sometimes rendering machine totally unresponsive. I can probably tweak OS memory settings to avoid locking the machine but this behaviour is not expected (and looking at comments above, not limited to Linux).

Unfortunately, I cannot share project code and currently there is no minimal repro project (from me at least).

Best regards,

Victor

0

Victor,

Could you please check if mono-sgen memory usage expands on the latest Rider EAP build when you run your tests? If it does, please collect a thread dump when memory usage runs high (Help -> Create Backend Thread Dump)? Please attach it to a new support request.

0

Hello,

I think I have a similar issue. My computer gets really really slow sometimes, and I do have quite good hardware. I'm pretty sure this is because of Rider. Even when using Gitkraken and Chrome my computer is slow. When looking at Activity Monitor Rider takes around 1,54GB and I have two mono-sgen processes at 1,50GB each. Not too bad I guess.

Mac OS Mojave version 10.14.6
Macbook Pro 15 inch 2018
2,9GHz i9
32GB 2400 Mhz DDR4
Radeon Pro 560X 4GB
JetBrains Rider 2019.1.2 (Build #RD-191.7141.355, built on June 5, 2019)
dotnet SDK version 2.2.300

Usually have 2 instances of Rider running, with reasonable big .NET Core 2 projects. Around 1k unit tests per project and some tests using the ASP.NET Core TestHost feature.

Please let me know if you need more details to investigate this.

 

0

Hi Jim, 

As we said before, this memory usage is around average. 

Could you please check 2019.2.2 and if it still slow, please collect a thread dump when memory usage runs high (Help -> Create Backend Thread Dump). Please attach it to a new support request. This allows us to investigate the situation. Thank you! 

0

Please sign in to leave a comment.