Netbeans not Releasing Memory.

View: New views
6 Messages — Rating Filter:   Alert me  

Netbeans not Releasing Memory.

by Elam Daly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

Windows Vista, jdk 1.6.0_07, Netbeans 6.1

I'm developing an RCP Module Suite with Netbeans.  On startup, Nb consumes about 150 megabytes.   When I start my Module Suite through Netbeans, my memory consumption jumps up from 40-100 megs on each invocation.  That's on top of the memory consumed by the RCP.  Now, when I close the RCP, the memory is not released via Netbeans, and eventually( after about 6 invocations), i'm at around 500 megs, which I assume is the limit set by the -Xmx flag.

Is this a feature or a bug?  I'd rather not have Netbeans holding on to my memory if it's not needed.

Thanks,
- Elam  

Re: Netbeans not Releasing Memory.

by anm-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

for me it's even worse. I am using a MacBook PRO, 2 GB RAM, JDK 1.5,  
Netbeans 6.5 beta.
I started Netbeans and worked on some code. Then I got something to  
eat without shutting
Netbeans down. After some while (an hour or so) I got back to my  
computer and found NB
consuming approx. 500 MB. Again an hour later without too much work  
on NB it is consuming
1.1GB RAM. (I was browsing some blogs.)

By now the system is full, starting new apps will take a lot of time.  
I can get a useable
system by shutting down NB.

It seems there is some memory leak consuming memory and not releasing  
it. I think I can
reproduce this just by starting NB and waiting for some hours, as I  
have seen this several
times.

Best regards,

     anm


Am 02.09.2008 um 22:41 schrieb Elam Daly:

> Hi All,
>
> Windows Vista, jdk 1.6.0_07, Netbeans 6.1
>
> I'm developing an RCP Module Suite with Netbeans.  On startup, Nb  
> consumes about 150 megabytes.   When I start my Module Suite  
> through Netbeans, my memory consumption jumps up from 40-100 megs  
> on each invocation.  That's on top of the memory consumed by the  
> RCP.  Now, when I close the RCP, the memory is not released via  
> Netbeans, and eventually( after about 6 invocations), i'm at around  
> 500 megs, which I assume is the limit set by the -Xmx flag.
>
> Is this a feature or a bug?  I'd rather not have Netbeans holding  
> on to my memory if it's not needed.
>
> Thanks,
> - Elam


Parent Message unknown Re: Netbeans not Releasing Memory.

by Petr.Cyhelsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
does forcible invocation of garbage collector (via repeated clicking on
memory toolbar) help, or does it do nothing with memory consumption? If
it does not, can you please generate heap dump(via for example visualVM
https://visualvm.dev.java.net/) when this happens and upload it
somewhere to let us see it. With regards

Petr Cyhelsky

On Tue, Sep 2, 2008 at 11:23 PM, anm <donderstorm@...> wrote:

    Hi all,

    for me it's even worse. I am using a MacBook PRO, 2 GB RAM, JDK 1.5,
    Netbeans 6.5 beta.
    I started Netbeans and worked on some code. Then I got something to
    eat without shutting
    Netbeans down. After some while (an hour or so) I got back to my
    computer and found NB
    consuming approx. 500 MB. Again an hour later without too much work
    on NB it is consuming
    1.1GB RAM. (I was browsing some blogs.)

    By now the system is full, starting new apps will take a lot of
    time. I can get a useable
    system by shutting down NB.

    It seems there is some memory leak consuming memory and not
    releasing it. I think I can
    reproduce this just by starting NB and waiting for some hours, as I
    have seen this several
    times.

    Best regards,

       anm


    Am 02.09.2008 um 22:41 schrieb Elam Daly:


        Hi All,

        Windows Vista, jdk 1.6.0_07, Netbeans 6.1

        I'm developing an RCP Module Suite with Netbeans.  On startup,
        Nb consumes about 150 megabytes.   When I start my Module Suite
        through Netbeans, my memory consumption jumps up from 40-100
        megs on each invocation.  That's on top of the memory consumed
        by the RCP.  Now, when I close the RCP, the memory is not
        released via Netbeans, and eventually( after about 6
        invocations), i'm at around 500 megs, which I assume is the
        limit set by the -Xmx flag.

        Is this a feature or a bug?  I'd rather not have Netbeans
        holding on to my memory if it's not needed.

        Thanks,
        - Elam




Re: Netbeans not Releasing Memory.

by anm-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

garbage collection will not change it. The memory monitor displays  
memory usage of 150 MB.
After gc it will drop down to 50 or 60 MB. But if I look on the  
system itself, I see that
NB is using 1.2 GB.

I downloaded visualVM. Unfortunatly it will only run with 1.6. So I  
enabled the dev version
of 1.6 for MacOS X 10.4 (final version is only available for OS X  
10.5). So I was able to
start VisualVM. But I was not able to generate a head dump for NB.  
(It is possible for
VisualVM, but not for NB.) Just look at the screenshots.









I searched the docs, but could not find a solution for that. Is there  
any switch I have to use?
It seems strange to me that you could check a head of o running tool  
without permission of the
app.

Best regards,

anm



Am 03.09.2008 um 10:09 schrieb Petr Cyhelsky:

> Hi,
> does forcible invocation of garbage collector (via repeated  
> clicking on memory toolbar) help, or does it do nothing with memory  
> consumption? If it does not, can you please generate heap dump(via  
> for example visualVM https://visualvm.dev.java.net/) when this  
> happens and upload it somewhere to let us see it. With regards
>
> Petr Cyhelsky
>
> On Tue, Sep 2, 2008 at 11:23 PM, anm <donderstorm@...> wrote:
>
>    Hi all,
>
>    for me it's even worse. I am using a MacBook PRO, 2 GB RAM, JDK  
> 1.5,
>    Netbeans 6.5 beta.
>    I started Netbeans and worked on some code. Then I got something to
>    eat without shutting
>    Netbeans down. After some while (an hour or so) I got back to my
>    computer and found NB
>    consuming approx. 500 MB. Again an hour later without too much work
>    on NB it is consuming
>    1.1GB RAM. (I was browsing some blogs.)
>
>    By now the system is full, starting new apps will take a lot of
>    time. I can get a useable
>    system by shutting down NB.
>
>    It seems there is some memory leak consuming memory and not
>    releasing it. I think I can
>    reproduce this just by starting NB and waiting for some hours, as I
>    have seen this several
>    times.
>
>    Best regards,
>
>       anm
>
>
>    Am 02.09.2008 um 22:41 schrieb Elam Daly:
>
>
>        Hi All,
>
>        Windows Vista, jdk 1.6.0_07, Netbeans 6.1
>
>        I'm developing an RCP Module Suite with Netbeans.  On startup,
>        Nb consumes about 150 megabytes.   When I start my Module Suite
>        through Netbeans, my memory consumption jumps up from 40-100
>        megs on each invocation.  That's on top of the memory consumed
>        by the RCP.  Now, when I close the RCP, the memory is not
>        released via Netbeans, and eventually( after about 6
>        invocations), i'm at around 500 megs, which I assume is the
>        limit set by the -Xmx flag.
>
>        Is this a feature or a bug?  I'd rather not have Netbeans
>        holding on to my memory if it's not needed.
>
>        Thanks,
>        - Elam
>
>


Bild 1.png (41K) Download Attachment
Bild 2.png (46K) Download Attachment

Re: Netbeans not Releasing Memory.

by tomas.hurka :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Sep 3, 2008, at 1:32 PM, anm wrote:
>
> garbage collection will not change it. The memory monitor displays  
> memory usage of 150 MB.
> After gc it will drop down to 50 or 60 MB.

> But if I look on the system itself, I see that
> NB is using 1.2 GB.
>
> I downloaded visualVM. Unfortunatly it will only run with 1.6. So I  
> enabled the dev version
> of 1.6 for MacOS X 10.4 (final version is only available for OS X  
> 10.5). So I was able to
> start VisualVM. But I was not able to generate a head dump for NB.
You need to run NetBeans on JDK 6 - you are probably running it on JDK  
5.

> I searched the docs, but could not find a solution for that. Is  
> there any switch I have to use?
> It seems strange to me that you could check a head of o running tool  
> without permission of the
> app.
You can generate heap dump on JDK 1.5.0_14 and newer using -XX:
+HeapDumpOnCtrlBreak switch. See
<http://forums.sun.com/thread.jspa?threadID=5179031> and <http://blogs.sun.com/poonam/entry/heap_dump_using_xx_heapdumponctrlbreak 
 > for some details about HeapDumpOnCtrlBreak switch.

Bye,
--
Tomas Hurka   <mailto:tomas.hurka@...>
NetBeans Profiler http://profiler.netbeans.org
VisualVM http://visualvm.dev.java.net
Software Engineer, Developer Platforms Group
Sun Microsystems, Praha Czech Republic




Re: Netbeans not Releasing Memory.

by Elam Daly :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Forcible invocation of the gc doesn't help me either.

I haven't used visualVM before, but just so I'm clear, when do I generate the heap dump?

Cheers,
 -Elam

On Wed, Sep 3, 2008 at 4:09 AM, Petr Cyhelsky <Petr.Cyhelsky@...> wrote:
Hi,
does forcible invocation of garbage collector (via repeated clicking on memory toolbar) help, or does it do nothing with memory consumption? If it does not, can you please generate heap dump(via for example visualVM https://visualvm.dev.java.net/) when this happens and upload it somewhere to let us see it. With regards

Petr Cyhelsky


On Tue, Sep 2, 2008 at 11:23 PM, anm <donderstorm@...> wrote:

  Hi all,

  for me it's even worse. I am using a MacBook PRO, 2 GB RAM, JDK 1.5,
  Netbeans 6.5 beta.
  I started Netbeans and worked on some code. Then I got something to
  eat without shutting
  Netbeans down. After some while (an hour or so) I got back to my
  computer and found NB
  consuming approx. 500 MB. Again an hour later without too much work
  on NB it is consuming
  1.1GB RAM. (I was browsing some blogs.)

  By now the system is full, starting new apps will take a lot of
  time. I can get a useable
  system by shutting down NB.

  It seems there is some memory leak consuming memory and not
  releasing it. I think I can
  reproduce this just by starting NB and waiting for some hours, as I
  have seen this several
  times.

  Best regards,

     anm


  Am 02.09.2008 um 22:41 schrieb Elam Daly:


      Hi All,

      Windows Vista, jdk 1.6.0_07, Netbeans 6.1

      I'm developing an RCP Module Suite with Netbeans.  On startup,
      Nb consumes about 150 megabytes.   When I start my Module Suite
      through Netbeans, my memory consumption jumps up from 40-100
      megs on each invocation.  That's on top of the memory consumed
      by the RCP.  Now, when I close the RCP, the memory is not
      released via Netbeans, and eventually( after about 6
      invocations), i'm at around 500 megs, which I assume is the
      limit set by the -Xmx flag.

      Is this a feature or a bug?  I'd rather not have Netbeans
      holding on to my memory if it's not needed.

      Thanks,
      - Elam




LightInTheBox - Buy quality products at wholesale price!