The best tool that I've seen for profiling GlassFish is the "collect"
tool from Sun Studio (now Oracle Studio). Sun Studio is available as
part of OpenSolaris and is easy to run in a VM if you have an x86
system. This is also the tool that is recommended by our performance team.
To use the collect tool:
1. Start and stop the domain.
2. Grab the Java command line that is used to start the DAS from the
server.log file. Put it in a file, add a "\" to the end of each line,
and add "collect -j on \" as the first line in the file. You can also
add other collect command line options there to change the sample rate, etc.
3. Run the file as a script from the domain's "config" directory.
4. One the DAS is running, perform the operations on it that you want to
profile, e.g., deploy, accessing application pages, etc.
5. Run "asadmin stop-domain" to stop the server.
The profile data is now in a directory with a name like "test.1.er". To
see the data, run the "analyzer" tool on the directory. You can also
print out the data using the "er_print" tool. The timeline tab in the
analyzer tool is especially useful to see the interactions between
various threads within the DAS.
This tool works fine with the OSGi infrastructure in GlassFish. If you
would like a demo of this, please let me know.
Tom
On 10/11/2010 6:57 PM, Shing Wai Chan wrote:
> Hi,
>
> I am looking for tools for profiling GlassFish 3.1.
> (Note that this is osgi, as default, visualvm does not see the class
> in web-glue.jar.)
>
> Any recommendations?
> Thanks.
> Shing Wai Chan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>