Home » Language IDEs » ServerTools (WTP) » Eclipse Performance
Eclipse Performance [message #199824] |
Mon, 17 September 2007 10:27 |
Eclipse User |
|
|
|
Originally posted by: aman.jain3.gmail.com
Hi,
I had been using Eclipse for quite a sometime now. Actually I am
working in an organization wherein I work on an Insurance product which is
being developed on J2EE.
I have got 2GB of RAM on my machine. But since last 3 months I am
facing problems while working with Eclipse - while I am working all of a
sudden it sort of hangs and after that I have to wait for around 7-10 mins
for it to come back.
When it stops working I noticed in the Task Manager (I have Windows XP
on my desktop) that whole of 100% percent CPU is being used by the
Eclipse. But again this is not the case everytime. I cant say how many
times in an hour it stops responding as it happens only when you are
working. As an example (just to give an idea of how high is the level of
irritation nowadays with me) - if I type a letter in the editor and if I
save it - it gets saved immediately but the very next moment it stops
working (i.e. getting hanged). To avoid this particular situation I
unchecked the 'Build Automatically' option also but agian no use.
Moreover, the case is same with whole of my team. Everyone in my team
has got 2GB of RAM. We have tried a number of things but nothing is
working.
So, finally I would say that it would be very helpful to us if someone
can suggest things to do to avoid such things.
|
|
|
Re: Eclipse Performance [message #199835 is a reply to message #199824] |
Mon, 17 September 2007 13:50 |
David Carver Messages: 174 Registered: July 2009 |
Senior Member |
|
|
Aman Jain wrote:
> Hi,
> I had been using Eclipse for quite a sometime now. Actually I am
> working in an organization wherein I work on an Insurance product which
> is being developed on J2EE.
> I have got 2GB of RAM on my machine. But since last 3 months I am
> facing problems while working with Eclipse - while I am working all of a
> sudden it sort of hangs and after that I have to wait for around 7-10
> mins for it to come back.
> When it stops working I noticed in the Task Manager (I have Windows XP
> on my desktop) that whole of 100% percent CPU is being used by the
> Eclipse. But again this is not the case everytime. I cant say how many
> times in an hour it stops responding as it happens only when you are
> working. As an example (just to give an idea of how high is the level of
> irritation nowadays with me) - if I type a letter in the editor and if I
> save it - it gets saved immediately but the very next moment it stops
> working (i.e. getting hanged). To avoid this particular situation I
> unchecked the 'Build Automatically' option also but agian no use.
> Moreover, the case is same with whole of my team. Everyone in my team
> has got 2GB of RAM. We have tried a number of things but nothing is
> working.
> So, finally I would say that it would be very helpful to us if someone
> can suggest things to do to avoid such things.
>
Aman,
One of the issues with Eclipse is that it can tend to use a lot of
memory and frees very little of it back, due to the plugin architecture
design it has. One of the things I have done on my under powered,
limited memory system to help speed up performance (1.2gh celeron M,
with 1GB memory), is change JVMs that I use. I've personally found
under Windows that the JRockit JVM with the following JRockit specific
settings works quite well, with the following client specific settings:
-client -Xms356m -XXallocPrefetch -XXallocRedoPrefetch
I'm currently using BEA's Jrockit 1.5. I;ve found overall response is
quicker. JRockit learns and adapts to how the application works so the
longer it runs the better it seems to perform (it was originally
designed for servers).
Much of the issue is the number of classes and that Eclipse doesn't free
memory as well as it should (contrary to popular modern beliefs memory
isn't necessarily cheap, good programming practices should still be
applied.)
|
|
|
Re: Eclipse Performance [message #199851 is a reply to message #199835] |
Mon, 17 September 2007 13:07 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
David,
Comments below.
David Carver wrote:
> Aman Jain wrote:
>> Hi,
>> I had been using Eclipse for quite a sometime now. Actually I am
>> working in an organization wherein I work on an Insurance product
>> which is being developed on J2EE.
>> I have got 2GB of RAM on my machine. But since last 3 months I am
>> facing problems while working with Eclipse - while I am working all
>> of a sudden it sort of hangs and after that I have to wait for around
>> 7-10 mins for it to come back.
>> When it stops working I noticed in the Task Manager (I have Windows
>> XP on my desktop) that whole of 100% percent CPU is being used by the
>> Eclipse. But again this is not the case everytime. I cant say how
>> many times in an hour it stops responding as it happens only when you
>> are working. As an example (just to give an idea of how high is the
>> level of irritation nowadays with me) - if I type a letter in the
>> editor and if I save it - it gets saved immediately but the very next
>> moment it stops working (i.e. getting hanged). To avoid this
>> particular situation I unchecked the 'Build Automatically' option
>> also but agian no use.
>> Moreover, the case is same with whole of my team. Everyone in my
>> team has got 2GB of RAM. We have tried a number of things but nothing
>> is working.
>> So, finally I would say that it would be very helpful to us if
>> someone can suggest things to do to avoid such things.
>>
>
> Aman,
>
> One of the issues with Eclipse is that it can tend to use a lot of
> memory and frees very little of it back, due to the plugin
> architecture design it has.
There's no correlation between the plugin architecture design itself and
how much memory is used. Certainly plugins can have a lot of .class
files in them and loading them all takes memory, but that's the case no
matter whether plugins are involved or not. Memory that's no longer
needed and isn't freed is a leak and leaks will tend to cause the system
to exhaust memory as time goes by. But that's a bug not a problem
inherent to a plugin architecture. It doesn't sound like Aman was
running into out-of-memory issues. It sounds more likely that the
validators were taking really long, and that could be caused by a
firewall blocking http access to schemas or other resources that might
be referenced by files in the project.
Using ctrl-break to see what the process is doing would help provide
more details (and would make it clear if for example it's waiting for a
web page to respond).
> One of the things I have done on my under powered, limited memory
> system to help speed up performance (1.2gh celeron M, with 1GB
> memory), is change JVMs that I use. I've personally found under
> Windows that the JRockit JVM with the following JRockit specific
> settings works quite well, with the following client specific settings:
>
> -client -Xms356m -XXallocPrefetch -XXallocRedoPrefetch
>
> I'm currently using BEA's Jrockit 1.5. I;ve found overall response
> is quicker. JRockit learns and adapts to how the application works so
> the longer it runs the better it seems to perform (it was originally
> designed for servers).
>
> Much of the issue is the number of classes and that Eclipse doesn't
> free memory as well as it should (contrary to popular modern beliefs
> memory isn't necessarily cheap, good programming practices should
> still be applied.)
If there are cases where memory that's no longer needed isn't being
freed that should be reported as a bug so it can be fixed. Given that
Eclipse is an IDE, folks will often make blanket statements about
Eclipse as a whole, but it's important to realize that different parts
are contributed by different groups and a problem in one part doesn't
necessarily imply a problem in all parts...
|
|
|
Re: Eclipse Performance [message #199859 is a reply to message #199851] |
Mon, 17 September 2007 14:25 |
David Carver Messages: 174 Registered: July 2009 |
Senior Member |
|
|
Ed Merks wrote:
> David,
>> One of the issues with Eclipse is that it can tend to use a lot of
>> memory and frees very little of it back, due to the plugin
>> architecture design it has.
> There's no correlation between the plugin architecture design itself and
> how much memory is used. Certainly plugins can have a lot of .class
> files in them and loading them all takes memory, but that's the case no
> matter whether plugins are involved or not. Memory that's no longer
> needed and isn't freed is a leak and leaks will tend to cause the system
> to exhaust memory as time goes by. But that's a bug not a problem
Actually, I would have to disagree a bit here, because Eclipse does lazy
loading, and doesn't necessarily unload plugins when they are no longer
being used, then it is inherit in the eclipse design that it will always
grow in memory usage.
Some of the CPU issues can also be attested to the JVM trying to do
garbage collection.
> inherent to a plugin architecture. It doesn't sound like Aman was
> running into out-of-memory issues. It sounds more likely that the
> validators were taking really long, and that could be caused by a
> firewall blocking http access to schemas or other resources that might
> be referenced by files in the project.
Yes, validators can cause pause times, but most of those should be
running as background applications. All I know is that by switching
JVM's to one that had better performance tuned to the system that it
runs, I've gotten a much better response from eclipse overall.
>
> Using ctrl-break to see what the process is doing would help provide
> more details (and would make it clear if for example it's waiting for a
> web page to respond).
>>
>> Much of the issue is the number of classes and that Eclipse doesn't
>> free memory as well as it should (contrary to popular modern beliefs
>> memory isn't necessarily cheap, good programming practices should
>> still be applied.)
> If there are cases where memory that's no longer needed isn't being
> freed that should be reported as a bug so it can be fixed. Given that
> Eclipse is an IDE, folks will often make blanket statements about
> Eclipse as a whole, but it's important to realize that different parts
> are contributed by different groups and a problem in one part doesn't
> necessarily imply a problem in all parts...
Very simple in my case. Take a large XML or XSD editor, and load it
into memory (plenty of examples of available at either
www.starstandard.org, www.openapplications.org), and work with them for
a while. I'll see if I can create some specific scenarios, but I think
WTP in general can use some profiling to make sure we are cleaning up as
we go along.
I agree that the problem is probably more isolated to a eclipse project
by project basis, but that also makes it difficult to track down exactly
where the cause is. An architecture that favors keeping items in
memory (i.e. plugin classes) when they aren't necessarily being used any
longer is going to consume more memory at the expense of the cost of
having to reload and reinitalize a class if it is used again. A
balance needs to be struct. Not everybody has quad core machines where
this issue isn't as noticeable as when you have a single core machine.
And different JVM's have difference performance with Eclipse and the
way it works. I've just found JRockit to fit my needs the best.
|
|
|
Re: Eclipse Performance [message #199881 is a reply to message #199859] |
Mon, 17 September 2007 14:10 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
David,
More comments below.
David Carver wrote:
> Ed Merks wrote:
>> David,
>>> One of the issues with Eclipse is that it can tend to use a lot of
>>> memory and frees very little of it back, due to the plugin
>>> architecture design it has.
>> There's no correlation between the plugin architecture design itself
>> and how much memory is used. Certainly plugins can have a lot of
>> .class files in them and loading them all takes memory, but that's
>> the case no matter whether plugins are involved or not. Memory
>> that's no longer needed and isn't freed is a leak and leaks will tend
>> to cause the system to exhaust memory as time goes by. But that's a
>> bug not a problem
>
> Actually, I would have to disagree a bit here, because Eclipse does
> lazy loading, and doesn't necessarily unload plugins when they are no
> longer being used, then it is inherit in the eclipse design that it
> will always grow in memory usage.
That's just one of the plugin architecture design capabilities.
Unloading plugins is also supported. The footprint of classes is
typically not a limiting factor but rather the footprint of instances
that scales and grows in proportion to the actual size and number of
resources in the workspace. It's typically the case that a plugin is
loaded because the code is needed and code that's needed will mostly be
needed again. I'm not sure if a system not based on plugins ever
unloads classes once the class is loaded? I suspect not and I suspect
that only if you designed a system with separate class loaders could a
class be garbage collected by virtue of its class loader having been
garbage collected. Clearly as long as instances of the class exist, the
class must continue to exist...
>
> Some of the CPU issues can also be attested to the JVM trying to do
> garbage collection.
>
>> inherent to a plugin architecture. It doesn't sound like Aman was
>> running into out-of-memory issues. It sounds more likely that the
>> validators were taking really long, and that could be caused by a
>> firewall blocking http access to schemas or other resources that
>> might be referenced by files in the project.
>
> Yes, validators can cause pause times, but most of those should be
> running as background applications. All I know is that by switching
> JVM's to one that had better performance tuned to the system that it
> runs, I've gotten a much better response from eclipse overall.
Yes, different JVM implementations can have drastically different
performance characteristics!
>
>>
>> Using ctrl-break to see what the process is doing would help provide
>> more details (and would make it clear if for example it's waiting for
>> a web page to respond).
>>>
>>> Much of the issue is the number of classes and that Eclipse doesn't
>>> free memory as well as it should (contrary to popular modern
>>> beliefs memory isn't necessarily cheap, good programming practices
>>> should still be applied.)
>> If there are cases where memory that's no longer needed isn't being
>> freed that should be reported as a bug so it can be fixed. Given
>> that Eclipse is an IDE, folks will often make blanket statements
>> about Eclipse as a whole, but it's important to realize that
>> different parts are contributed by different groups and a problem in
>> one part doesn't necessarily imply a problem in all parts...
>
> Very simple in my case. Take a large XML or XSD editor, and load it
> into memory (plenty of examples of available at either
> www.starstandard.org, www.openapplications.org), and work with them
> for a while. I'll see if I can create some specific scenarios, but I
> think WTP in general can use some profiling to make sure we are
> cleaning up as we go along.
That may well be the case. I know I've fixed various leak issues with
EMF editors over the years, so I know it's easy for there to be problems.
>
> I agree that the problem is probably more isolated to a eclipse
> project by project basis, but that also makes it difficult to track
> down exactly where the cause is. An architecture that favors keeping
> items in memory (i.e. plugin classes) when they aren't necessarily
> being used any longer is going to consume more memory at the expense
> of the cost of having to reload and reinitalize a class if it is used
> again.
Do you know of a system that automatically unloads classes?
> A balance needs to be struct. Not everybody has quad core machines
> where this issue isn't as noticeable as when you have a single core
> machine. And different JVM's have difference performance with Eclipse
> and the way it works. I've just found JRockit to fit my needs the best.
I can assure you that none of the people I know at IBM have quad core
machines either! Note that the number of cores has nothing to do with
the amount of memory that's used.
>
>
|
|
| |
Re: Eclipse Performance [message #199912 is a reply to message #199896] |
Mon, 17 September 2007 19:12 |
Eclipse User |
|
|
|
Originally posted by: aman.jain3.gmail.com
Thanks David, Ed for all your answers.
Here, I would like to add one more issue to the existing problems - that I
do face out-of-memory issues at least 4 times a day (most of the time
during the time I am building my project) - A dialog pops-up saying that
an out of memory has occured- Do you want to exit the workbench?(wherein
only option is to exit :).
Bit more information - My product makes use of lots of things (actually
its a Life Insurance platform rather than calling it a product). Starting
from - Core Java, JSP, Servlets, EJBs, JMS, JNDI, Struts, AJAX, extensive
use of XML, CSS - and some more. The platform uses all of them. And one
more thing that I use Maven tool to build my project. When the project is
fully build its size really increases leapbounds.
If the above information could help you suggest more on improving the
performance then please help me out. Ans also after reading the above if
you expect more information I can provide the details.
I am newcomer to the Eclipse newsgroup and also I am not that much
experienced to understand all the terms you both have been using in whole
of the discussion but still at least i am getting a blurred picture of
what might be happening during such hang-ups.
Finally, I would definitely try what you suggested to figure out the
problems.
THANKS again.
|
|
|
Re: Eclipse Performance [message #199920 is a reply to message #199912] |
Mon, 17 September 2007 20:16 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Aman,
Unless you outline a specific reproducible scenario that demonstrates a
leak, it's unlikely anyone will be able to help you. You started out
describing hangs and several people have explained how to gather data
about that, but now you've switched to talking about memory conditions.
Using Window->Preferences->General->Show heap status you'll be able to
see how much memory is used. If repeated steps cause this to grow
unbounded, then you've found a leak. Someone on the platform newsgroup
pointed out that you've not described what if anything you've done to
increase the heap size. The default is quite small...
Aman Jain wrote:
> Thanks David, Ed for all your answers.
>
> Here, I would like to add one more issue to the existing problems -
> that I do face out-of-memory issues at least 4 times a day (most of
> the time during the time I am building my project) - A dialog pops-up
> saying that an out of memory has occured- Do you want to exit the
> workbench?(wherein only option is to exit :).
>
> Bit more information - My product makes use of lots of things
> (actually its a Life Insurance platform rather than calling it a
> product). Starting from - Core Java, JSP, Servlets, EJBs, JMS, JNDI,
> Struts, AJAX, extensive use of XML, CSS - and some more. The platform
> uses all of them. And one more thing that I use Maven tool to build my
> project. When the project is fully build its size really increases
> leapbounds.
>
> If the above information could help you suggest more on improving the
> performance then please help me out. Ans also after reading the above
> if you expect more information I can provide the details.
>
> I am newcomer to the Eclipse newsgroup and also I am not that much
> experienced to understand all the terms you both have been using in
> whole of the discussion but still at least i am getting a blurred
> picture of what might be happening during such hang-ups.
>
> Finally, I would definitely try what you suggested to figure out the
> problems.
> THANKS again.
>
|
|
| |
Re: Eclipse Performance [message #199960 is a reply to message #199824] |
Tue, 18 September 2007 14:52 |
Eclipse User |
|
|
|
Originally posted by: davisons.qwest.com
I ran into a similar problem recently with Eclipse 3.3. Disabling the spell
checker fixed it. The setting is in Preferences -> Editors -> Text
Editors -> Spelling. Uncheck the 'Enable spell checking' option. I don't
know why anyone would want to spell check program source code anyway.
At any rate, I'll be interested to hear if it makes a difference for you.
Regards,
Stephen
"Aman Jain" <aman.jain3@gmail.com> wrote in message
news:ef93433275d699ca964d1e873dc358a4$1@www.eclipse.org...
> Hi,
> I had been using Eclipse for quite a sometime now. Actually I am working
> in an organization wherein I work on an Insurance product which is being
> developed on J2EE.
> I have got 2GB of RAM on my machine. But since last 3 months I am facing
> problems while working with Eclipse - while I am working all of a sudden
> it sort of hangs and after that I have to wait for around 7-10 mins for it
> to come back.
> When it stops working I noticed in the Task Manager (I have Windows XP
> on my desktop) that whole of 100% percent CPU is being used by the
> Eclipse. But again this is not the case everytime. I cant say how many
> times in an hour it stops responding as it happens only when you are
> working. As an example (just to give an idea of how high is the level of
> irritation nowadays with me) - if I type a letter in the editor and if I
> save it - it gets saved immediately but the very next moment it stops
> working (i.e. getting hanged). To avoid this particular situation I
> unchecked the 'Build Automatically' option also but agian no use.
> Moreover, the case is same with whole of my team. Everyone in my team has
> got 2GB of RAM. We have tried a number of things but nothing is working.
> So, finally I would say that it would be very helpful to us if someone
> can suggest things to do to avoid such things.
>
|
|
|
Re: Eclipse Performance [message #199975 is a reply to message #199960] |
Tue, 18 September 2007 15:38 |
Eclipse User |
|
|
|
Originally posted by: aman.jain3.gmail.com
Stephen,
I already have the 'Spelling Checker' turned off. But I am trying out
other options that I could conclude based on the discussions that went
between Ed and David for a few days.
Will update all by next week.
Thanks
|
|
| |
Re: Eclipse Performance [message #200248 is a reply to message #199932] |
Sat, 22 September 2007 22:10 |
Eclipse User |
|
|
|
Originally posted by: aman.jain3.gmail.com
Hey David, Ed
As you discussed I tried the following -
- increased the heap size to 512M max.
- increased the size for PermGen to 256M.
- Turned off a few features of Eclipse that may slow down it like -
turned off code folding, turned off auto code assist (only turning it on
while I write code as most of the time I have to debug in the code) and
few more.
Just wanted reiterate the problems -
- Eclipse hangs quite frequently and comes back only after 7-10 mins.
- Very often OutOfMemory problems whenever I build my code.
When it hangs the top menu bar (File,Edit, Navigate etc menus) becomes
'white' in color and the actual menu disappears. And no matter what you do
( tried pressing 'Ctrl+Break' also )nothin would happen until the next
7-10 mins. Only option is to go the 'Task Manager' and kill the process if
you can contain yourself.
|
|
|
Re: Eclipse Performance [message #200264 is a reply to message #200248] |
Sun, 23 September 2007 11:42 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
This is a multi-part message in MIME format.
--------------050604080208070000060509
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit
Aman,
Here are instructions for how to gather data that will be useful for
folks to track down the issues that are causing your problems:
http://wiki.eclipse.org/How_to_report_a_deadlock
It's important that a console window be hooked up to the running process
in order for ctrl-break to work.
I know many folks make their heap a lot bigger than you did. You say
your machine has 2G of physical memory so setting the heap to 1024
should be reasonable. Have you turned the heap monitor widget on as I
described to get a sense for what activities might be causing your heap
to grow without bounds? Is it builds, opening lots of editors,
debugging repeatedly?
You have to think like a developer when you are reporting problems that
you'd like to see addressed. Imagine your customer coming to you and
what information you'd need to reproduce the problems they describe...
Aman Jain wrote:
> Hey David, Ed
> As you discussed I tried the following - - increased the heap size
> to 512M max.
> - increased the size for PermGen to 256M.
> - Turned off a few features of Eclipse that may slow down it like -
> turned off code folding, turned off auto code assist (only turning it
> on while I write code as most of the time I have to debug in the code)
> and few more.
>
> Just wanted reiterate the problems - - Eclipse hangs quite
> frequently and comes back only after 7-10 mins.
> - Very often OutOfMemory problems whenever I build my code.
>
> When it hangs the top menu bar (File,Edit, Navigate etc menus) becomes
> 'white' in color and the actual menu disappears. And no matter what
> you do ( tried pressing 'Ctrl+Break' also )nothin would happen until
> the next 7-10 mins. Only option is to go the 'Task Manager' and kill
> the process if you can contain yourself.
>
--------------050604080208070000060509
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Aman,<br>
<br>
Here are instructions for how to gather data that will be useful for
folks to track down the issues that are causing your problems:<br>
<blockquote><a href="http://wiki.eclipse.org/How_to_report_a_deadlock">http://wiki.eclipse.org/How_to_report_a_deadlock</a><br>
</blockquote>
It's important that a console window be hooked up to the running
process in order for ctrl-break to work.<br>
<br>
I know many folks make their heap a lot bigger than you did.
|
|
|
Goto Forum:
Current Time: Fri Sep 20 22:47:12 GMT 2024
Powered by FUDForum. Page generated in 0.04712 seconds
|