4

I was happily using Eclipse 3.2 (or as happy as one can be using Eclipse) when for a forgotten reason I decided to upgrade to 3.4. I'm primarily using PyDev, Aptana, and Subclipse, very little Java development.

I've noticed 3.4 tends to really give my laptop a hernia compared to 3.2 (vista, core2duo, 2G). Is memory usage on 3.4 actually higher than on 3.2, and if so is there a way to reduce it?

EDIT: I tried disabling plugins (I didn't have much enabled anyway) and used the jvm monitor; the latter was interesting but I couldn't figure out how to use the info in any practical way. I'm still not able to reduce its memory footprint. I've also noticed every once in a while Eclipse just hangs for ~30 seconds, then magically comes back.

3
  • 1
    I've noticed the same thing. I went back to 3.2 Sep 19, 2008 at 7:10
  • Which version of Eclipse are you using? You can download the "eclipse classic" which is not too bad. If you download the distributions that include tools for Java developers, etc., it will make you pay... :)
    – Uri
    Nov 23, 2008 at 23:42
  • 1
    I saw this thread - stackoverflow.com/questions/1490803/… They recommend shutting off the spell checker. I tried it and saved over 100 MB.
    – Andres
    Oct 15, 2009 at 16:39

4 Answers 4

3

Yes memory usage can get real high and you might run into problems with your JVM, as the default setting is a bit to low. Consider using this startup parameters when running eclipse:

-vmargs -XX:MaxPermSize=1024M -Xms256M -Xmx1024M
3

With those options, I manage to limit the memory used to 700Mo (which is quite high, but still workable with my 2 Go)

-vmargs
-Xms128m
-Xmx384m
-Xssv2m
-XX:PermSize=128m
-XX:MaxPermSize=128m
-XX:CompileThreshold=5
-XX:+UseParallelGC
-Dcom.sun.management.jmxremote

And consider also to launch

C:\[jdk1.6.0_0x path]\bin\jconsole.exe

And choose 'Connection / New connection / 'eclipse' to monitor the memory used by eclipse
(which is why I use '-Dcom.sun.management.jmxremote')

Other options are available here.

2

The more plugins you have, the more memory Eclipse will consume. 3.4 includes more plugins by default than 3.3, and so on, and so on, as more and more developers clamor for features to be included.

Go to Window->Show View, and start typing "plug in", and one of the options will be the Plug In Registry. Open that view, and click on the arrow to show active plugins only. These are the plugins actually loaded into memory. My Eclipse 3.3 currently has 89 out of 445 or so plugins loaded. You can then selectively start disabling plugins from the Help menu, once you see which ones you won't use (right now, for instance, I"m not using Mylyn, but I hope to in the future).

2

To add to my previous answer and to your recent update:

Eclipse just hangs for ~30 seconds, then magically comes back.

That is usually a sign for a failed network access with a timeout (and the associated 'freeze' while the application is waiting for said timeout).

try typing 'net use' in a DOS prompt, and check if you have net path declared there, some of them you could get rid off ('net use /D aUselessPath'). To be sure, check also the shares that you declare (net share).


Since you are with Vista, try also to deactivate superfetch and see if you still experience those freezes (both for eclipse and Firefox).
Open a CMD prompt with administrative privileges and enter "net stop superfetch" to stop the SuperFetch service.
It is not a good long-term solution though, just a quick check to make. Superfetch should be kept on, and will actually restart on your next reboot, since the service is set to start automatically at each Windows session.
Again, this is just to see if there is any connection between that service and your freezes.

2
  • Thanks, tried "net use", got "There are no entries in the list." I think it may be something more systematic; FireFox does the same once in a while.
    – Parand
    Sep 25, 2008 at 18:54
  • "Net Use" only shows connections. I recommend disabling superfetch all the time. It's job is to consume all of your available memory by caching things you might use in the future. My typical use performs better when I have free memory available when needed.
    – bruceatk
    Sep 27, 2008 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.