I have following setup, but when I put 1024 and replace all 512 with 1024, then eclipse won\'t start at all. How can I have more than 512M memory for my eclipse JVM?
You can copy this to your eclipse.ini
file to have 1024M:
-clean -showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms512m
-Xmx1024m
-XX:PermSize=128m
-XX:MaxPermSize=256m
I don't think you need to change the MaxPermSize to 1024m. This works for me:
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx1024m
-XX:PermSize=64m
-XX:MaxPermSize=128m
Care and feeding of Eclipse's memory hunger is a pain...
More or less, keep trying smaller amounts til it works, that's your max.
Here is how i increased the memory allocation of eclipse Juno:
I have a total of 4GB on my system and when im working on eclipse, i dont run any other heavy softwares along side it. So I allocated 2Gb.
The thing i noticed is that the difference between min and max values should be of 512. The next value should be let say 2048 min + 512 = 2560max
Here is the heap value inside eclipse after setting -Xms2048m -Xmx2560m
:
While working on an enterprise project in STS (heavily Eclipse based) I was crashing constantly and STS plateaued at around 1GB of RAM usage. I couldn't add new .war files to my local tomcat server and after deleting the tomcat folder to re-add it, found I couldn't re-add it either. Essentially almost anything that required a new popup besides the main menus was causing STS to freeze up.
I edited the STS.ini (your Eclipse.ini can be configured similarly) to:
--launcher.XXMaxPermSize 1024M -vmargs -Xms1536m -Xmx2048m -XX:MaxPermSize=1024m
Rebooted STS immediately and saw it plateau at about 1.5 gigs before finally not crashing
Configuring this worked for me: -vmargs -Xms1536m -Xmx2048m -XX:MaxPermSize=1024m on Eclipse Java Photon June 2018
Running Windows 10, 8 GB ram and 64 bit. You can extend -Xmx2048 -XX:MaxpermSize= 1024m to 4096m too, if your computer has good ram.Mine worked well.