I'm doing some benchmarking and I want to know how to set memory for both IntelliJ and Tomcat.
In the bottom right corner I see 98M of 147M in IntelliJ, what is that for?
How do I know if I have allocated tomcat enough memory?
Configure JVM optionsFrom the main menu, select Help | Edit Custom VM Options. If you do not have any project open, on the Welcome screen, click Configure and then Edit Custom VM Options. If you cannot start IntelliJ IDEA, manually copy the default file with JVM options to the IntelliJ IDEA configuration directory.
From the main menu, select Help | Change Memory Settings. Set the necessary amount of memory that you want to allocate and click Save and Restart.
IntelliJ IDEA memory usage Follow IntelliJ itself reports that it is using a little more than 1GB of heap but the OS reports that it is using anywhere from 3.5 to 4.5 GB.
You can simply change three lines in your VM Options
Help->Edit Custom VM Options. Replace the first three lines by :
-Xms1024m
-Xmx4096m
-XX:ReservedCodeCacheSize=1024m
It's good numbers if you have 8-12Go in your machine.
Set memory options for IntelliJ itself in its VM options file.
Contents/info.plist
(embedded in the app's directory)bin/idea.vmoptions
(install dir/)bin/idea.exe.vmoptions
for example C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 12.1.1\bin\idea.exe.vmoptions
As of IntelliJ 12, for OS X:
/Applications/IntelliJ IDEA.app/bin/idea.vmoptions
should be copied to ~/Library/Preferences/IntelliJIdeaXX/idea.vmoptions
This is as per JetBrains' DOC-197 linked to by CrazyCoder.
The memory indicator shows used/max memory.
You know if you've allocated TC enough memory if it doesn't run out, and/or doesn't hiccup due to a large GC, and/or doesn't thrash swapping. Tomcat memory settings are configured in the Tomcat run configuration where it says "VM options".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With