Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse uses 100 % CPU randomly

Tags:

eclipse

My eclipse sometimes starts using 100 % of my CPU very spontaneously. I can't figure out why it needs that much CPU usage. There is no background task like "building workspace" running.

After some time the CPU load drops to 0 and everything is normal.

I can't find any information related to the problem in workspace/.metadata/.log file.

Has anybody some tip how I can figure out which part of eclipse is using the CPU so heavily? Is there a way to get a thread dump of eclipse? The kill -3 on the eclipse process doesn't do anything.

Eclipse Version: Galileo JavaEE
Operating System: Linux 2.6.31

like image 785
Florian Gutmann Avatar asked Apr 21 '10 10:04

Florian Gutmann


2 Answers

Sounds like garbage collection

You could try changing the settings in your eclipse.ini, maybe with a higher Xmx value

--launcher.XXMaxPermSize 256m -vmargs -Xms256m -Xmx1024m -XX:PermSize=64m -Xss1M -server -XX:+DoEscapeAnalysis -XX:+UseConcMarkSweepGC 
like image 152
stacker Avatar answered Oct 21 '22 23:10

stacker


You can use visualvm to profile eclipse, get a heap dump or a thread dump, see which threads are running, etc.

like image 21
Stephen Denne Avatar answered Oct 21 '22 23:10

Stephen Denne