score:122

Accepted answer

i've had a lot of problems trying to get eclipse to accept as much memory as i'd like it to be able to use (between 2 and 4 gigs for example).

open eclipse.ini in the eclipse installation directory. you should be able to change the memory sizes after -vmargs up to 1024 without a problem up to some maximum value that's dependent on your system. here's that section on my linux box:

-vmargs
-dosgi.requiredjavaversion=1.5
-xx:maxpermsize=512m
-xms512m
-xmx1024m

and here's that section on my windows box:

-vmargs
-xms256m
-xmx1024m

but, i've failed at setting it higher than 1024 megs. if anybody knows how to make that work, i'd love to know.

edit: 32bit version of juno seems to not accept more than xmx1024m where the 64 bit version accept 2048.

edit: nick's post contains some great links that explain two different things:

  • the problem is largely dependent on your system and the amount of contiguous free memory available, and
  • by using javaw.exe (on windows), you may be able to get a larger allocated block of memory.

i have 8 gigs of ram and can't set -xmx to more than 1024 megs of ram, even when a minimal amount of programs are loaded and both windows/linux report between 4 and 5 gigs of free ram.

score:1

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

score:1

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.

score:4

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 

score:4

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

score:6

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.

score:37

here is how i increased the memory allocation of eclipse juno:

enter image description here

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:

enter image description here


Related Query

More Query from same tag