Last night, I was working in Eclipse Juno when it stopped responding. It's been doing this ever since; if I try to modify code or run it, it will stop responding for a few seconds.
In Task Manager, it shows several instances of javaw.exe running and that my CPU is at 100%. However, seeing as my computer is still running, I doubt that is actually the case. Nonetheless, these files worry me and I don't know if they should be deleted or not.
I tried increasing the memory of the classes I'm working on (Eclipse "javaw.exe" High CPU usage -> How to increase application heap size in Eclipse?) but it didn't help.
I'm don't know to much about the inner workings of Eclipse so please bear with me.
Related
I am using GGTS 3.2 JUNO 4.2.2 with Grails 2.2.1. It occurs to me that the environment is very slow after a while. What can I do to make it faster?
Is there a way to use the full potential of the underlying system?
What I did was (GGTS.ini):
-Xms768m
-Xmx768m
-XX:PermSize=1024m
-XX:MaxPermSize=1024m
-XX:+UseParallelGC
Working with Grails and GGTS demands a high amount of memory provided to GGTS. The reason why your IDE is getting slower by the time is because it has to do many "stop-the-world" Garbage Collections to get the memory it needs.
Especially you can see that on opening a GSP file the first time on your IDE ...then GGTS goes dark for a while.
And you can see that on the heap status at the right bottom of your IDE (enable it at your preferences). Every time the used memory is near to your provided 1GB your GGTS is stop working for two or more seconds. After that there is some free memory again.
1GB of memory for GGTS is ridiculous low - 2GB should be the minimum with Grails and Eclipse.
But that's not all. GGTS has a memory leak with Grails Tests and automatically building. You can try to remove the Unit and Integration tests from your projects build path. That is my trick to avoid slowdowns. But if I had to write Unit Tests I have to restart GGTS every once in a while. (And I have 8192m written in my ggts.ini.)
Eclipse Foundation has published solutions for this
http://wiki.eclipse.org/Platform_UI/Juno_Performance_Investigation
Putting this: -vm C:\devsw\java\jdk7_67\jre\bin\server\jvm.dll in my GGTS.ini (and restarting GGTS) has stopped the blue circle from spinning.
I searched lot about this topics but can't find a proper solution.
I am using eclipse 3.6 Helios version with operating system fedora15. In my application I am using GWT2.4 for front end development.
Now while I work with debug mode and want to debug at some point at the same time eclipse hangs for 3-4 mins.It resumes after and again start to debug process.
I am using this eclipse from last 3 years with windows but not faced this issue.In fedora I am using it from last 4 months and this problems stated to occur from last one month.
I am not getting what is the issues with eclipse.
Please help me out.
Thanks in advance.
Is this something that happens with different projects/code, or is it the same code that causes freezes? I've had issues where threads have started in the background and caused problems.
You say "(...) hangs for 3-4 mins.It resumes after and again start to debug process.", what do you mean? Does it continue to debug and move to the next line, or is there a crash and it restarts?
How long has it been since you changed workspace? I've found this, rather than the Eclipse installation, to be an issue over time. Create a new workspace folder, export all your projects and preferences and start fresh.
You are using GWT 2.4 and I think you might be working with UI.xml too... There is a tag in each ui.xml at the top like
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
Which means eclipse is going to get that xhtml.ent file each time and there is a issue in GWT eclipse plugin have a look to below link
http://code.google.com/p/google-web-toolkit/issues/detail?id=5265
There is one comment which says
For me, removing
SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"
and saving the document,
solves the problem..
maybe it is needed for something, so better you copy that locally somewhere, and link that.
Try it out and let me know.
I had experienced the exact same problem on a less-powerful notebook I had to use.
Try one of the following
Download the latest Eclipse version (It needs, just as helios, a lot of RAM and CPU because it's based on a new "architekture", in contrast to, for instance, galileo)
Make sure you are using the latest JDK and JRE
Download Eclipse Galileo, which does require pretty less resources and goes still very very fine with most projects!
It sounds like you are experiencing the features of the latest Eclipse arch. In the latest versions of Eclipse I have noticed that the more plugins and add-ons you have installed, the slower the environment runs. There are a lot of similar posts regarding performance on the new platform
I have removed all but the plugins I am using and never install anything not needed into the Eclipse environment.
I "may" have experience this. Not sure. Suddenly started working again. I was getting a hang every time I would try to debug an app, in the part of the code (inside GWT) that creates a "table" element. Could be that there is something that just takes a while and you just have to "wait it out" the when it happens. Go get a cup of coffee, type thing. anyway I HAD stepped deep into the GWT code, plenty so I'm convinced it IS a GWT issue of some kind.
I was thinking it was some infinite recursion possibly in the logging system (like logger code accidentally trying to log itself, and going into loop?). Also there's a 50/50 chance that it was simply clicking on 'run' instead of 'debug' made it start working again. So at least try that if you have problems. My gut instinct and 30yrs programming under my belt tells me it's logger related. I can rule out "slow computers" because I never had this happen until I got a new machien which is Dell XPS, Core i7, 8 GB ram, and massive disk. So I wouldn't blame hardware, or Eclipse bloat.
i recently started using STS on a 64 bit Windows machine. Often when i "clean" my project STS gets unresponsive or just takes minutes to build while loading context.xml. files.
How can I fix this? Is it looking for resources on the web and waiting for timeouts.?
EDIT: I noticed that during the build process my network usage goes up. Not sure yet what is going on there...
EDIT: Possibly STS is loading all of the referenced springsource XSD files for XML validation?`If so, how can I disable this validation (apart from copying the files and referencing them locally, of course)? I've already tried disabling all of the Preferences related to "Validation" in STS - to no avail.
Often it is, because java is running out of free memory and need to run the garbage collector very often.
You can see the free memory in the bottom right corner of eclipse if you enable Window/Prefercences/General/"Show heap status".
If you can confirm that it is a memory problem, then you can increase the memory in sts.ini (-Xmx).
It is said that the 64bit java version needs up to 1/3 more memory than the 32bit version. But I don't know if this rumour is right or not.
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
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
You can use visualvm to profile eclipse, get a heap dump or a thread dump, see which threads are running, etc.
If anyone else is having this problem, I fixed it for myself.
Set the option "auto build project" to off. That should remove a lot of the CPU used by Eclipse.
For my installation, I noticed the heap status indicator (Enabled VIA Window>Preferences "Show heap status" under General) was displaying less max heap than allocated in eclipse.ini (the -Xmx setting). The status indicator was bouncing around indicating that garbage collection was struggling to keep memory low.
Increasing the initial/min heap size (the -Xms setting) seems to have caused Eclipse/Java to stop trying to manage memory as much.
Eclipse is loading and unloading information from memory whenever this is required. If you workspace is big and you work with multiple projects and also your eclipse is configured to use low ammount of memory this is normal. Someone suggested above to change the xmx and xms values so that your eclipse uses more memory (if you have available) I suggest u put the same value to both of them. For example -Xms4048m and -Xmx4048m (or more) in your eclipse.ini file. This way your system will attempt to make use of that space once you start your IDE and the Garbage Collector (GC) takes less time to process data.
For me, the solution was to give Eclipse fewer threads. From my really long answer here:
Solution: decrease the max number of threads Eclipse can use, down to 1/2 as many as your computer has. So, if your computer has 8 physical "cores" (actually: hyperthreads), then decrease the max number of threads that Eclipse can use to 4, or <= half of your number of cores for your system, as follows:
In $HOME/eclipse/cpp-2022-09/eclipse/eclipse.ini on Linux Ubuntu, or equivalent for your OS, make this change (reducing from 10 threads max, to 4, in my case):
Change from:
-Declipse.p2.max.threads=10
to:
-Declipse.p2.max.threads=4
Restart Eclipse.
Now, Eclipse can only take up to 4 of my 8 threads, and my system runs much better!
Read my long answer for more details and other changes I made to help: High CPU usage in Eclipse when idle
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.
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
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.
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).
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.