Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Performance tuning parameters for IntelliJ IDEA. Add these params in idea64.exe.vmoptions or idea.exe.vmoptions file in IntelliJ IDEA. If you are using JDK 8.x, please knock off PermSize and MaxPermSize parameters from the tuning configuration.
-server
-Xms2048m
-Xmx2048m
-XX:NewSize=512m
-XX:MaxNewSize=512m
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseParNewGC
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
-XX:SurvivorRatio=8
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:+AggressiveOpts
-XX:+CMSClassUnloadingEnabled
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-XX:+CMSParallelRemarkEnabled
-XX:CMSInitiatingOccupancyFraction=65
-XX:+CMSScavengeBeforeRemark
-XX:+UseCMSInitiatingOccupancyOnly
-XX:ReservedCodeCacheSize=64m
-XX:-TraceClassUnloading
-ea
-Dsun.io.useCanonCaches=false
@maxio89

This comment has been minimized.

Copy link

commented Jan 26, 2015

Why have you two GC settings?
XX:+UseParNewGC
and also:
-XX:+UseConcMarkSweepGC

@mmizutani

This comment has been minimized.

Copy link

commented Feb 11, 2015

As explained in the official documentations for UNIX and Windows (http://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html and http://docs.oracle.com/javase/8/docs/technotes/tools/windows/java.html), not only -XX:PermSize and -XX:MaxNewSize but also some other options listed above were deprecated in JDK 8:
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing

@spoage

This comment has been minimized.

Copy link

commented May 2, 2015

@maxio89 the former GC setting sets the young heap GC, the latter sets the old heap GC.

@edwardbeckett

This comment has been minimized.

Copy link

commented Aug 21, 2015

I'm using these settings and running very well..

@bro0k

This comment has been minimized.

Copy link

commented Sep 16, 2015

thanks

@r4lly99

This comment has been minimized.

Copy link

commented Apr 10, 2017

thanks

@tucq88

This comment has been minimized.

Copy link

commented Apr 17, 2017

Does this work with phpstorm ?

@ivanstnsk

This comment has been minimized.

Copy link

commented May 21, 2017

works well, thnx :)

@cuteapoot

This comment has been minimized.

Copy link

commented Jul 10, 2017

Can you direct me to something that explains what all of these options mean? I keep seeing these options around, but I don't know which ones really apply to my machine or situation.

@P7h

This comment has been minimized.

Copy link
Owner Author

commented Jul 20, 2017

@bobojo, this section of documentation has more details for all the options for:

@m-horejsi

This comment has been minimized.

Copy link

commented Aug 31, 2017

How actual is this settings? For example in default vmoptions in Intellij IDEA 2017.2.2 is ReservedCodeCacheSize=240m.
I found this and it's updated to IntelliJ IDEA 2017.2 - let's try it 🙂

@inthegarage

This comment has been minimized.

Copy link

commented Feb 1, 2018

Intellij 2017.3 will moan about the code cache size, it should be around:
-XX:ReservedCodeCacheSize=256m

or remove the setting altogether.

@aridastidar

This comment has been minimized.

Copy link

commented Mar 19, 2019

-XX:ReservedCodeCacheSize=64m threw a warning on MacOS HighSierra. Considering increasing to 240m or more.

@reloxx13

This comment has been minimized.

Copy link

commented Aug 2, 2019

Pay attention, alot of those options are deprecated and will lead in not starting the application.

Unix Debian with Phpstorm from snap

I had to do this:

Remove

-XX:+UseParNewGC
-XX:PermSize=512m
-XX:MaxPermSize=512m
-XX:+UseConcMarkSweepGC
-XX:+AggressiveOpts
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
 
Replace
-XX:-TraceClassUnloading -Xlog:class+unload=off

This is my current file for PHPStorm:
~/.PhpStorm2019.2/config/phpstorm64.vmoptions

-server
-Xms1g
-Xmx4g
-XX:NewSize=512m
-XX:MaxNewSize=1g
-XX:ParallelGCThreads=4
-XX:MaxTenuringThreshold=1
-XX:SurvivorRatio=8
-XX:+UseCodeCacheFlushing
-XX:+CMSClassUnloadingEnabled
-XX:+CMSParallelRemarkEnabled
-XX:CMSInitiatingOccupancyFraction=65
-XX:+CMSScavengeBeforeRemark
-XX:+UseCMSInitiatingOccupancyOnly
-XX:ReservedCodeCacheSize=256m
-Xlog:class+unload=off
-ea
-Dsun.io.useCanonCaches=false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.