This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 221772 - Netbeans uses all the memory
Summary: Netbeans uses all the memory
Status: RESOLVED DUPLICATE of bug 221331
Alias: None
Product: ide
Classification: Unclassified
Component: Performance (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Hurka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-08 23:06 UTC by Petah
Modified: 2012-11-15 09:51 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Profile (1.49 MB, application/octet-stream)
2012-11-09 00:32 UTC, Petah
Details
Resource Monitor (88.93 KB, image/png)
2012-11-11 22:01 UTC, Petah
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petah 2012-11-08 23:06:50 UTC
Netbeans uses up all the memory I can through at it.

I set the -J-Xmx switch in netbeans.conf to as high as possible until I start getting "JVM Creation Failed" errors.

This is about 1.2Gb

While netbeans is running it will slowly ramp up to the full 1.2Gb

Then it starts GC thrashing and hanging every few seconds. 

At the worst of times it increases up to 50-100Mb per second. 

I was having this issue using Netbeans 7.2, so I updgraded to 7.3b2 today, and it is still occurring. 

I have about 20-30 projects open. Some are rather big. But I am only actively working on a few.

Also is there a way to allow Netbeans to use more than 1.2Gb memory? 

I use the PHP/HTML5 build of Netbeans, not the Java one.
Comment 1 Petah 2012-11-09 00:32:26 UTC
Created attachment 127437 [details]
Profile

Took a profile, hope it helps.

Note: this was taken while NB was still scanning (has been scanning for over an hour with no progress). But the issue occurs when NB is not scanning as well.
Comment 2 Tomas Hurka 2012-11-09 08:24:17 UTC
(In reply to comment #0)
> Netbeans uses up all the memory I can through at it.
> 
> I set the -J-Xmx switch in netbeans.conf to as high as possible until I start
> getting "JVM Creation Failed" errors.
> 
> This is about 1.2Gb
> 
> While netbeans is running it will slowly ramp up to the full 1.2Gb
> 
> Then it starts GC thrashing and hanging every few seconds. 
Did you get OutOfMemoryError?
 
> I have about 20-30 projects open. Some are rather big. But I am only actively
> working on a few.
It does not make any difference that you are working on a few of them. All opened project has to be scanned. So if you want to see some improvement, open just those which you use.
 
> Also is there a way to allow Netbeans to use more than 1.2Gb memory? 
This is Windows OS problem. Do you run 32bit or 64bit Windows OS?

> I use the PHP/HTML5 build of Netbeans, not the Java one.
To diagnose the issue, we need messages.log and heap dump. Preferably the one dumped at OutOfMemoryError. 
Once you have the heap dump, zip it and use this page <http://deadlock.netbeans.org/hudson/job/upload/build?delay=0sec> to upload it.
Comment 3 Tomas Hurka 2012-11-09 08:27:23 UTC
(In reply to comment #1)
> 
> Took a profile, hope it helps.
> 
> Note: this was taken while NB was still scanning (has been scanning for over an
> hour with no progress). But the issue occurs when NB is not scanning as well.
The self-profile shows that the IDE is doing up-to-date check of the files in your project(s). Almost all time is spent in doing I/O.
Comment 4 Petah 2012-11-09 20:55:27 UTC
I will check for an OutOfMemoryError next time I am at work.

I haven't noticed it before, it comes up as an icon in the bottom right corner right?

Looking at the Windows Resource Monitor, my hard drive is not being maxed out, and in most cases has very minimal activity.

However 1 core on the CPU is constantly maxed out.
Comment 5 Petah 2012-11-09 20:57:07 UTC
Oh, and I am running 64bit Windows 7.

Even if it was 32bit shouldn't the max me 2Gb, not 1.2Gb anyway?
Comment 6 Petah 2012-11-11 21:57:43 UTC
How do I generate a heap dump?

I looked at http://profiler.netbeans.org/docs/help/6.0/heapwalker.html

I don't think I have the "Profiler Control Panel"

"OutOfMemoryError" is not occurring, but it is still trashing the GC, and hanging.

jmap says "Unable to attach to 32-bit process running under WOW64"

There is no instructions for using jconsole.
Comment 7 Petah 2012-11-11 22:01:39 UTC
Created attachment 127567 [details]
Resource Monitor
Comment 8 Petah 2012-11-11 22:05:17 UTC
Ok, an OutOfMemoryError just occurred.
Comment 10 Tomas Hurka 2012-11-14 09:19:35 UTC
(In reply to comment #5)
> Oh, and I am running 64bit Windows 7.
> 
> Even if it was 32bit shouldn't the max me 2Gb, not 1.2Gb anyway?
No, since you must also count PermGen, JVM executable + all dependent dlls, native memory allocated by JVM. Anyway, if you are running 64bit Windows 7, use 64bit Java.
Comment 11 Petr Cyhelsky 2012-11-14 10:43:51 UTC
Thanks for the heap dump, this should be already fixed now, please try newest dev build.

*** This bug has been marked as a duplicate of bug 221331 ***
Comment 12 Petah 2012-11-14 23:21:42 UTC
Still eating all the memory on the latest dev build.

Tried to submit a OutOfMemoryError but I don't know if it worked.

Just hanging at 99% "Reading Reply"
Comment 14 Tomas Hurka 2012-11-15 09:18:27 UTC
Problem you reported is duplicate of 221331. Please do not reopen this issue. If you see another problem, file new issue.

*** This bug has been marked as a duplicate of bug 221331 ***
Comment 15 Petah 2012-11-15 09:31:27 UTC
I am having the same issue in a later build....
Comment 16 Petr Cyhelsky 2012-11-15 09:51:23 UTC
Have you examined the heap dump? It is possible, it seems to be the same issue, but the underlying problem might be different - that's why it is better to keep this issue resolved as duplicate and file new issue - we can investigate the problem and if it is the same issue reopen the former one :)

*** This bug has been marked as a duplicate of bug 221331 ***