Configuring IntelliJ IDEA VM options
April 21st, 2006 by Alexandra RusinaThe default VM options for IntelliJ IDEA may be not optimal when your project contains more than 10000 classes and developers often try to change the default options to minimize IntelliJ IDEA hangtime. But sometimes the changes make things even worse.
So, how to configure IntelliJ IDEA VM options optimally? That’s not so easy question to answer, since the configuration strongly depends on the project being developed.
However, it is a well-known fact that JetBrains “eats its own dog food” and uses IntelliJ IDEA for development of new IntelliJ IDEA versions. Therefore, we can recommend some settings that our developers use and explain the general memory policy.
1. -Xms = 32m (64m)
2. -Xmx = 256m
Please note that very big Xmx and Xms values are not so good. In this case, GarbageCollector has to work with a big part of memory at a time and causes considerable hang-ups. On the other hand, too small values can lead to the OutOfMemory exception. The specified values provide enough memory and at the same time the GarbageCollector works often but rather fast.
One more important thing is to pay attention to the memory indicator at the bottom-right corner of IntelliJ IDEA. If it shows that the memory in use is almost equal to the total memory available (let’s say 195m out of 220m), we recommend you to increase Xmx on 50m or so.
3. -XX:MaxPermSize=92m
This is a default value, and in most cases you don’t need to change it. You may increase it only if you get “OutOfMemoryError” in “PermGen space”.
4. -server
Some people find IntelliJ IDEA more responsive with this option. But it is not guaranteed.
5. We don’t recommend to use the following options at all, since they are not very stable:
-XX:+UseParallelGC
-XX:+UseAdaptiveSizePolicy
-XX:-UseConcMarkSweepGC
May 31st, 2006 at 2:31 am
I saw in the intellij.net website forum the followed: “-Dsun.awt.keepWorkingSetOnMinimize=true”.
Is it safe? Is it usefull?
I didn’t see it in your “not to use” parameters?
Thanks.
May 31st, 2006 at 7:57 am
We don’t configure this option for IntelliJ IDEA. So, I can’t say whether it is actually useful or not.
Probably, this link may help you somehow:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5043070
July 18th, 2008 at 1:06 pm
Have the recommendations changed in the past couple of years or are these still the recommended JVM settings with 7.0.3?
August 6th, 2008 at 8:06 pm
I finally boosted my IDEA to great performance again, just by buying a SSD drive.
See:
My IDE(A) is fast again
Happy coding
Michael