5

I have standard Eclipse Kepler with CDT installed. Sometimes when it stays idle for a while the javaw.exe starts eating the CPU up to 30%. Nothing is running in Eclipse, no indexing, no library update, no building or compiling.

How can I debug Eclipse to see if something is running in background? Does Eclipse have any console or log so I can see what exactly is being done?

Not to mention, I even restarted the Eclipse but it just works for a few moment and then again reaches high CPU usage. What could be the problem?

  • Windows 7 64bit
  • Eclipse Kepler standard (plugins ADT & CDT)
  • Java 7
Mikael S.
  • 1,005
  • 3
  • 14
  • 28
  • Hate to be that guy but sometimes just restarting the comp can fix something like this. Try that if someone with more Eclipse experience hasn't replied by now. – djbhindi Jun 05 '14 at 21:26
  • @djbhindi I have a similar problem every day I come to this pc and try to work with Eclipse =\ – Luiggi Mendoza Jun 05 '14 at 21:27
  • @djbhindi, last time it happened I rebooted the PC but nothing changed. I guess something like a background thread in constantly working in background but I don't know how to check it. – Mikael S. Jun 05 '14 at 21:28
  • @LuiggiMendoza That sucks man. Do you actually need Eclipse (it appears he does, as he's using CDT). I prefer developing java with just command prompt and text editor but I don't have to work on huge projects too often. Hopefully someone can tell you guys what's up. – djbhindi Jun 05 '14 at 21:29
  • @djbhindi I work with hundreds of classes and at least 7 projects opened at the same time =\ – Luiggi Mendoza Jun 05 '14 at 21:30
  • @LuiggiMendoza So, do you have any advice? I don't know why it does not work well in your case - I use Eclipse at work and at home and most of the time something like this happens when I forget to stop the debugger and/or built-in servers (particularly in debug mode) before exiting. In this case the javaw.exe process sometimes (infrequently) detaches and remains active in background causing Eclipse's own process to work too hard. – Germann Arlington Jun 05 '14 at 21:38
  • @GermannArlington the only time I use a debugger is for integration tests, generated over junit and Spring test, and for some small console applications I do in my spare time. I haven't worked in a solution for this problem since I have more work to accomplish =\ – Luiggi Mendoza Jun 05 '14 at 21:41
  • I've not checked the cpu usage but eclipse has been extremely slow for me sometimes(on windows) and it has almost always had something to do with some sort of remote (file?)system checking (not sure about the name). – Daniel Figueroa Jun 05 '14 at 21:43

1 Answers1

1

You can try add some memory to eclipse.ini parameter -Xmx512m

It can be useful in some cases but you will need to try it.. Hope that helps

Aviad
  • 1,539
  • 1
  • 9
  • 24
  • It has nothing to do with memory. It works perfectly but frequently this happens. – Mikael S. Jun 05 '14 at 21:30
  • I ran into things in eclipse that was weird, I had 100% CPU Usage.. And i have search for a solution, I saw this once maybe even on SO and it worked.. It had something to do with memory used instead of other expensive operations.. So the memory decrease CPU usage – Aviad Jun 05 '14 at 21:32
  • 1
    Remove this parameter for Java to allocate its memory heap as needed. This way garbage collection will only kick in only so often. – Basilevs Jun 06 '14 at 01:39
  • @Basilevs So you mean this have to do with the garbage colloector. This makes complete sense since this symptoms of this problems looks similar and the troubles appear at the memory limit – patrik Oct 10 '14 at 14:30