How to reduce Eclipse's memory usage?

Eclipse 3.4 can consume a lot more memory than the previous versions, courtesy the spellchecker plug-in.

You can switch off the plug-in by going to Window -> Preferences -> General -> Editors -> Text Editors -> Spelling, and unchecking the box title 'Enable spell checking'.

Of course, the tips offered to use larger heap sizes and better garbage collectors would do you good as well.


Checking General -> Show heap status will enable this

Eclipse heap status bar

in the bottom bar. This way you can manually run the garbage collector whenever you want by clicking on the trash can. It's not a fix, more like a workaround, but it helped reduce massively my RAM / CPU usage.


Modern versions of Eclipse do need quite a bit of RAM to do their thing. But should still run pretty fast on any modern machine.

Assuming you have enough physical memory (2GB is fine unless you have lots of other processes running, or you're using RAD), see this article on Eclipse's memory usage for some tips on tweaking the settings. The two most common culprits are Xmx and/or MaxPermSize being set too low (Xmx defaults to 256M and MaxPermSize defaults to 64M).

You modify the values by passing command line arguments or tweaking the eclipse.ini in the Eclipse install location.

You should end up with something like this:

...
-vmargs
-Xms128m
-Xmx1024m 
-XX:MaxPermSize=128m

Tags:

Eclipse