The original version of this document was here: http://tomaszdziurko.pl/2015/11/1-and-the-only-one-to-customize-intellij-idea-memory-settings/
I say "was" because it has been removed now, although there is a backup here: https://web.archive.org/web/20161125171758/http://tomaszdziurko.pl/2015/11/1-and-the-only-one-to-customize-intellij-idea-memory-settings/
In case the archived page ever disappears, I have copied the most important parts here:
What the original doesn't necessarily make clear is what file it is you need to change. Basically search for
idea.vmoptions which I believe you will find somewhere under
I have tested four different settings, to make reading easier each of them was given a name.
These are built-in settings provided by JetBrains, clean IDEA 15 is using them:
1 2 3 4 5
4096MB for Xmx and 1024MB for ReservedCodeCacheSize, that’s quite a lot of memory.
1 2 3 4
2GB for Xmx and 2GB for Xms, more balanced approach to the memory consumption
1 2 3 4
2GB for Xmx and 2GB for Xms as above, but different Garbage Collector is specified and many different flags for GC and memory management. I have received these settings from Yuri.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
So these are our test setups. To perform our test scenarios we have to create a file idea.vmoptions under ~/Library/Preferences/IntelliJIdea15/ (it is Mac OS specific, to see how change these settings for your OS, check this article).
Now it is time to perform our test scenarios and compare the results.