title: Optimal JVM settings for IntelliJ 15 CE
body: <p>IntelliJ comes with some default settings for JVM(Java 8) which are far beyond from optimal. I experience some unexpected freezes, relatively high CPU usage, etc.</p>
  
  <p>Unfortunately, I have no experience in tuning JVM, so I would like to ask a community to suggest best JVM settings for Mac machine that has i7 CPU + 16GB of RAM to achieve the most responsive and low CPU usage experience in IntelliJ 15 CE (Golang plugin) assuming that I am not running lots of apps in parallel, just couple office apps for communication needs.</p>
  
  <p>Settings can be configured here:
  ~/Library/Preferences/IdeaIC15/idea.vmoptions</p>
  
  <p>My current config is:</p>
  
  <pre><code>-Xms2g
  -Xmx2g
  -XX:NewRatio=3
  -Xss16m
  -XX:+UseConcMarkSweepGC
  -XX:+CMSParallelRemarkEnabled
  -XX:ConcGCThreads=4
  -XX:ReservedCodeCacheSize=240m
  -XX:+AlwaysPreTouch
  -XX:+TieredCompilation
  -XX:+UseCompressedOops
  -XX:+UseParNewGC
  -XX:SoftRefLRUPolicyMSPerMB=50
  </code></pre>
  
  <p>I am not sure most of these options make much sense, I expect some of them are already obsolete and enabled by default. However, with this config CPU usage dropped dramatically, as well as IDE is much more responsive, but short freezes are still noticeable. Any suggestions?</p>