dev@grizzly.java.net

Re: Tutorial Contribution

From: Sven Reimers <sven.reimers_at_gmail.com>
Date: Mon, 23 Jul 2007 22:59:24 +0200

Never forget to add your current IDE overhead to your heapsize - it is
not just FindBugs running...

-Sven

On 7/23/07, charlie hunt <charlie.hunt_at_sun.com> wrote:
> Ken Cavanaugh wrote:
> > charlie hunt wrote:
> >> Ken Cavanaugh wrote:
> >>> Sven Reimers wrote:
> >>>> Yes you were right. An updated version is available from the
> >>>> updatecenter, where you originally got the plugin from.
> >>>>
> >>>> Thank for pointing out the defect.
> >>>>
> >>>> Hope it works for you now - nothing better than a satisfied and happy
> >>>> customer ;-)
> >>>>
> >>>> -
> >>> Unfortunately it still doesn't work. After upgrading to the latest
> >>> FindBugs plugin,
> >>> I took a copy of my current CORBA development workspace, started NB 5.5
> >>> under JDK 6u2, compiled the project, and clicked on FindBugs. I let
> >>> it run for
> >>> about an hour or so, but it still did not complete. All that
> >>> FindBugs says is
> >>> "FindBugs - [Unknown Progress-state] Java CORBA Development: codegen
> >>> workspace"
> >>> (the end of that is the current name of the project).
> >>>
> >>> Any ideas?
> >>>
> >>> Thanks,
> >>>
> >>> Ken.
> >>
> >> Take a look at one of my latter notes to Sven. In particular:
> >>
> >>> I had to increase the size of the Java heap specified for NetBeans
> >>> IDE in NetBean's configuration file, <netbeans install
> >>> dir>/etc/netbeans.conf. I had to increase the max Java heap size to
> >>> -Xmx768m. It ran out of memory at -Xmx512m which is quite a bit
> >>> larger than the default NetBeans ships with.
> >>>
> >>> I initially thought there might have been a memory leak in FingBugs
> >>> some where. But, after I forced a Full GC after the FindBugs
> >>> results were displayed, the live data in the Java heap shrank from
> >>> 493m to 90m. So, I think that's pretty clear evidence that there's
> >>> no memory leak.
> >>
> >> The FindBugs module itself uses an awful lot of Java heap.
> >>
> >> I had to configure a Java heap of -Xmx768m in order for it to
> >> complete successfully.
> >>
> >> The reason your experiment didn't complete is likely due to the Java
> >> heap not being large enough and a never ending cycle of Full GC's.
> >>
> >> This is not an issue with the Sven's FindBug's plug-in, it bug with
> >> FindBugs itself.
> >>
> > Could be. Here is what I have in $NETBEANS/etc/netbeans.conf:
> >
> > netbeans_default_options="-J-Xms100m -J-Xmx800m -J-XX:PermSize=32m
> > -J-XX:MaxPermSize=250m
> > -J-Xverify=none -J-Dapple.laf.userScreenMenuBar=true"
> >
> > Isn't that large enough? I can compile the project; but NB is hung in
> > FindBugs.
> > Unfortunately I can't attach jconsole to my NetBean instance to see
> > what's happening.
> >
> > Thanks,
> >
> > Ken.
>
> This is indeed very puzzling >:o
>
> I just grabbed the update from the latest (internal) CORBA workspace.
>
> I modified my netbeans.conf by quickly just changing previous set value
> of -J-Xmx384m to -J-Xmx1g.
>
> I did a Clean and Build of the project since I had new updates brought
> into my workspace.
>
> Then, I ran FindBugs. It completed in about 2 minutes. My Java heap is
> currently at 660m. You can display a GC monitor icon in NetBeans by
> doing View > Toolbar and checking the "Memory" box.
>
> Btw, you can also add a -J-verbose:gc to your netbeans.conf JVM command
> line and then launch netbeans from the command line. The output from
> the -verbose:gc will go to stdout / stderr.
>
> charlie ...
>
> --
>
> Charlie Hunt
> Java Performance Engineer
> 630.285.7708 x47708 (Internal)
>
> <http://java.sun.com/docs/performance/>
>
>
>