Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I set the memory for IntelliJ 14?

I just upgraded my IntelliJ to 14.0.3. But there's always a Out Of Memory dialog popped up to ask me to set the memory.

Following is my settings: enter image description here

I thought it's enough. But the dialog shows from time to time, and sometimes, it's no responding that I have to shutdown it.

How should set this for IntelliJ 14? Any ideas?

like image 585
Sky Avatar asked Feb 27 '15 08:02

Sky


People also ask

How much memory should I allocate to IntelliJ?

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.

How does IntelliJ analyze memory usage?

Open CPU and memory live chartsFrom the main menu, select View | Tool Windows | Profiler. Right-click the necessary process in the Profiler tool window and select CPU and Memory Live Charts. A new tab opens in which you can see the amount of resources the selected process consumes.


2 Answers

Open Intellij IDE's vmoptions file

For Mac Users

Help | Edit Custom VM Options...

or

Library > Preferences > Idea<YourVersion> > idea.vmoptions

For Window (32bit) Users

C:\Program Files (x86)\JetBrains\IntelliJ IDEA <your_version>\bin\idea.exe.vmoptions

For Window (64bit) Users

C:\Program Files (x86)\JetBrains\IntelliJ IDEA <your_version>\bin\idea64.exe.vmoptions

and setup it's memory as you wish. Below is sample settings for 2GB

-Xms128m -Xmx2048m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=240m -XX:+UseCodeCacheFlushing -XX:+UseCompressedOops 

Hopefully this help.

like image 68
Cataclysm Avatar answered Oct 14 '22 07:10

Cataclysm


I have allocated 4 GB to intelliJ 14 on windows 7. My settings in idea64.exe.vmoptions are :

-Xms4608m
-Xmx4608m
-Xmn2g
-Xss128k
-XX:MaxPermSize=1536m
-XX:ParallelGCThreads=20

like image 35
Sarneet Kaur Avatar answered Oct 14 '22 05:10

Sarneet Kaur