JVM Options
VM options are loaded from the IDE_HOME\bin\<product>[bits][.exe].vmoptions file.
The options are defined one per line:
-Xms128m
-Xmx512m
-XX:MaxPermSize=250m
-XX:ReservedCodeCacheSize=64m
-XX:+UseCodeCacheFlushing
-ea
-Dsun.io.useCanonCaches=false
- If you are running under 64-bit JVM (verify in Help | About), options should be edited in the file with 64 suffix in its name (idea64.exe.vmoptions, or idea64.vmoptions on Linux, but always idea.vmoptions on Mac).
- product would be one of following: idea, phpstorm, webstorm, pycharm, rubymine, appcode.
- -Xmx value limits the maximum heap memory size that the JVM can allocate.
Mac OS X Specifics
Don't edit .vmoptions and .properties files directly, it will violate the application signature, always make a copy of the files under IDE configuration directory and edit the copy instead. See this answer for details. The original file is located in /Applications/<Product>.app/Contents/bin folder (/Applications/<Product>.app/bin for older IDE versions).
IntelliJ IDEA Platform Properties
You can change properties in the IDE_HOME\bin\idea.properties file for all the products, some popular properties that you may want to adjust:
#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=2500
#---------------------------------------------------------------------
# This option controls console cyclic buffer: keeps the console output size not higher than the specified buffer size (Kb)
# Older lines are deleted. In order to disable cycle buffer use idea.cycle.buffer.size=disabled
#---------------------------------------------------------------------
idea.cycle.buffer.size=1024
Comments
I'm using this on my Intellij13 (idea.vmoptions) :
-ea
-server
-Xms1g
-Xmx1g
-Xss16m
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:+DoEscapeAnalysis
-XX:+UseCompressedOops
-XX:+UnlockExperimentalVMOptions
-XX:+UseConcMarkSweepGC
-XX:LargePageSizeInBytes=256m
-XX:ReservedCodeCacheSize=96m
-XX:+UseCodeCacheFlushing
-XX:+UseCompressedOops
-XX:ParallelGCThreads=8
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:+DisableExplicitGC
-XX:+ExplicitGCInvokesConcurrent
-XX:+PrintGCDetails
-XX:+PrintFlagsFinal
-XX:+AggressiveOpts
-XX:+HeapDumpOnOutOfMemoryError
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:CMSInitiatingOccupancyFraction=60
-XX:+CMSClassUnloadingEnabled
-XX:+CMSParallelRemarkEnabled
-XX:+UseAdaptiveGCBoundary
-XX:+UseSplitVerifier
-XX:CompileThreshold=10000
-XX:+UseCompressedStrings
-XX:+OptimizeStringConcat
-XX:+UseStringCache
-XX:+UseFastAccessorMethods
-XX:+UnlockDiagnosticVMOptions
Of course you will need to run your text editor as administrator if editing files in Windows 7-Program Files.
Hi Adolfo! Those settings are for what? make IntelliJ faster or what is the purpose? Thanks!
@Raul, the behavioural and performance settings are specifically combined to fit my machine and the type of projects I'm working with. Some of those flags are deprecated or changed with java 8... you can read more about the flags in the documentation:
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
@Adolfo What properties recommended for idea14, I tested these and substantially reduced startup time
Perhaps it would be better to link from MacOSX section to here https://www.jetbrains.com/idea/help/increasing-memory-heap.html
Or just copy the idea.vmoptions things over from there to here.
@Alejandrodazal I use more or less the same settings, but like I mentioned to Raul, if you are using java 8 you need to control your flags(PermGen to Metaspace),
-XX:MetaspaceSize=XXXm
-XX:MaxMetaspaceSize=XXXm
more info: http://java.dzone.com/articles/java-8-permgen-metaspace
on OSX you need to change the value of your <key>JVMVersion</key> to use java 8 with <string>1.8*</string>
@Adolfo
<key>JVMVersion</key>
<string>1.6+</string>
Work JDK 6/78
@Adolfo ~ Thanks for the MetaSpace reminder ... forgot all about permgen disappearing.
This is great information. Has anyone updated @Adolfo's original options/settings for the latest versions of the IDEs?
what is the optimum setting for file and why is it not easier to set? If we are to play with it over the life of the product.