File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse is always locked [High CPU & RAM usage] Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Reply Bookmark "Eclipse is always locked [High CPU & RAM usage]" Watch "Eclipse is always locked [High CPU & RAM usage]" New topic
Author

Eclipse is always locked [High CPU & RAM usage]

Talha Kabakus
Greenhorn

Joined: Feb 27, 2010
Posts: 23
Hello everyone,

I'm using Eclipse Galileo RC2 (the latest distrubition of Eclipse), it is always locked.. After a little time from startup it starts to use too much CPU and RAM.
And not a long time, it hardly replies to user interactions.

I really need your helps. As I know from my friends, I'm not the only one who has this problem. Are there anyone who knows the solution to solve this problem/bug.

Thanks in advance,
T
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 639
Perhaps your Eclipse environment is large (application size, number/size of plugins, etc.) and it just doesn't have enough memory allocated?

Have a look at the eclipse.ini file in the installation directory. There you will find a set of vmargs which will include one that looks like this: -Xmx512m. This is allocating the maximum heap memory for the JVM under which Eclipse is run. You may need to increase this.

Although 512m is large enough for my environment, I've heard another on this forum state that they can't run theirs with less than 1024m (1gig).
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
Also, without knowing anything about your machine, it's really tough to diagnose such a problem--it could be a *lot* of different things, but I always look at available machine RAM first, JVM memory settings second, disk space third, and so on.
Talha Kabakus
Greenhorn

Joined: Feb 27, 2010
Posts: 23
@Mark E Hansen, David Newton
Thank you so much for your interests. Here's the inside of my eclipse.ini file.
@David Newton
My laptop has 3 GB RAM, 2.0 GHz x2 CPU and 19 GB free space.

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
What plugins do you have installed and active?
Talha Kabakus
Greenhorn

Joined: Feb 27, 2010
Posts: 23
David Newton wrote:What plugins do you have installed and active?

I just installed "Hibernate". That's all.. I'm using "Eclipse Galileo IDE for Java EE Developers SR2", the first one in the download page.
Thanks & Regards,
T
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 4489

Take 2 or 3 thread dumps of Eclipse. Compare the resulting dumps. What you are looking for is whether the same thread is always active. Which thread it is and what that thread is doing might give some clue as to the problem.

My guesses as to the problem are:

a) Your eclipse is corrupted. Fix: download and install again

b) You have a bad system DLL. Most likely a driver, most likely for the network card (though usually I see hangs, not high CPU usage, with this kind of problem). Fix: install the latest drivers

c) You have a corrupted DLL. This could be caused by a virus. Fix: depends on the virus.

In general, this problem is not typical. I have run Eclipse on mltiple PCs, none of which showed this problem.


JBoss In Action
Talha Kabakus
Greenhorn

Joined: Feb 27, 2010
Posts: 23
Thanks Peter for your reply..
Well, truly I have just installed my OSs(both Ubuntu & Vista), so I don't think that my DLLs are corrupted. So my Eclipse IDE is new
and again I don't think it's corrupted too.. By the way when I googled this problem, I saw that I'm not the only one that have this problem.

Thanks & regards,
T
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 11740

512MB is enough to do basic "Hello, World" style apps.

1024MB can do most work, but it's likely to take a hit if you're debugging webapps using an embedded appserver such as the WTP Tomcat server.

My machine can't go any higher without specialized chip-juggling, so I've just resigned myself to periodic restarts. And some system tweaking.

If the memory crunch is system-wide, Virtual Storage paging will both slow down apps horribly and suck up CPU. You'd think 3GB would be enough for anybody (or was it 1MB? 640K?), but the web browser and mail client apps on most machines are huge offenders as well.


A lot the of modern-day software development platforms are designed to permit parcelling out work to those with the best aptitude for it. A lot of modern-day business is predicated on making one person do all the work, regardless of aptitude.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
Bah, what would anybody do with 64K and color?

Get off my lawn.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 4489

LOL! Apple, Commodore, Atari, other?
Talha Kabakus
Greenhorn

Joined: Feb 27, 2010
Posts: 23
I didn't understand what's happening here. Of course I don't have 64K RAM or graphics card. As I said before I have 3 GB RAM with two processors. My laptop is good while using any other softwares. But while using Eclipse, it's going to be slower time by time and after some time it doesn't respond to me. You can search in Google, I'm not the only one who has this problem. Some of my friends have this problem too. I think to solve this problem, I must change its configurations like Garbage Collector's work period. I'm a web developer, so I use Eclipse with Apache Tomcat. That's all my eclise has. No further plugins, etc.

Thanks..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12612
Peter Johnson wrote:LOL! Apple, Commodore, Atari, other?

TRS-80 Model I, Level 1, 4K, 1978.

@Talha: I've never seen this problem w/o having a bunch of plugins installed; I'm guessing you can tune it all you want, but some combination of your Eclipse and/or JDK and/or OS is likely causing the issue.

Of course I didn't assume you had 64K; don't be ridiculous. That was in response to Tim's earlier post, and is a long-running historical joke harking back to the days when us old people had machines with ***very*** limited power compared to today's machines. Heck, I'm only just now getting to be as productive now in Java as I was in Lisp or Smalltalk back in 1990, and then I was running on a M68030 with 64M RAM. It's kind of sad, really.
 
 
subject: Eclipse is always locked [High CPU & RAM usage]
 
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com