Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Optimal CLion VM memory settings for very large projects

Tags:

Im currently working on a fork of a VERY LARGE project with about 7-8 * 10^6 LoC and 100000+ classes. The problem is, of course, that the indexer or CLion in general runs out of memory or is very slow and not responsive.

I already saw the blog entry https://blog.jetbrains.com/idea/2006/04/configuring-intellij-idea-vm-options/ where you describe some memory projects but it seems not to fit for my project setup.

My .vmoptions file looks like this:

-Xss20m
-Xms2560m
-Xmx20000m
-XX:NewSize=1280m
-XX:MaxNewSize=1280m
-XX:ReservedCodeCacheSize=2048m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=500
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-Dawt.useSystemAAFontSettings=lcd
-Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine

Im working on a machine with 128GB MainMemory and Intel XEON 28 Core CPU, so the resources should not be the problem.

Do you have any recommendations for the optimal memory settings?

like image 876
p0w3r Avatar asked Apr 28 '17 08:04

p0w3r


1 Answers

I wrote a mail to JetBrains support and this was the answer:

The possibility to change how many cores should be used in CLion hasn't been implemented yet, we have a related feature request: https://youtrack.jetbrains.com/issue/CPP-3370. Please comment or upvote. Could you please capture a CPU snapshot so we can take a look at what is going on?

So it would be great if anybody who wants this feature +1's it on JetBrains YouTrack.

like image 148
p0w3r Avatar answered Sep 21 '22 10:09

p0w3r