dev@glassfish.java.net

Re: Profiling GlassFish 3.1

From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
Date: Tue, 12 Oct 2010 21:11:43 +0530

Oracle Studio is available for Linux platform also.
http://www.oracle.com/technetwork/server-storage/solarisstudio/downloads/index.html

I have used the following (Same as what Tom has suggested) to collect
the info.
[Later you can use STUDIO_HOME/bin/anazlyer to analyze the generated
results.]

$STUDIO_HOME/bin/collect -j on -d $OUTPUT_DIR java -Xruncollector -cp
$S1AS_HOME/modules/glassfish.jar -XX:+UnlockDiagnosticVMOptions
-XX:MaxPermSize=192m -XX:NewRatio=2 -Xmx512m -client -javaagent:
$S1AS_HOME/lib/monitor/btrace-agent.jar=unsafe=true,noServer=true
-Dosgi.shell.telnet.maxconn=1
-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver
-Dfelix.fileinstall.dir=$S1AS_HOME/modules/autostart/
-Djavax.net.ssl.keyStore=$S1AS_HOME/domains/domain1/config/keystore.jks
-Dosgi.shell.telnet.port=6666 -Djava.security.policy=
$S1AS_HOME/domains/domain1/config/server.policy
-Dfelix.fileinstall.log.level=3 -Dfelix.fileinstall.poll=5000
-Dcom.sun.aas.instanceRoot=$S1AS_HOME/domains/domain1
-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory -Dosgi.shell.telnet.ip=127.0.0.1 -Djava.endorsed.dirs=$S1AS_HOME/modules/endorsed:$S1AS_HOME/lib/endorsed -Dcom.sun.aas.installRoot=/home/trm/test/glassfishv3/glassfish -Dfelix.fileinstall.bundles.startTransient=true -Djava.ext.dirs=/usr/jdk/instances/jdk1.6.0/lib/ext:/usr/jdk/instances/jdk1.6.0/jre/lib/ext:$S1AS_HOME/domains/domain1/lib/ext -Dfelix.fileinstall.bundles.new.start=true -Djavax.net.ssl.trustStore=$S1AS_HOME/domains/domain1/config/cacerts.jks -Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as -Djava.security.auth.login.config=$S1AS_HOME/domains/domain1/config/login.conf -DANTLR_USE_DIRECT_CLASS_LOADING=true -Dorg.glassfish.web.rfc2109_cookie_names_enforced=false -Djava.library.path=$S1AS_HOME/lib:/usr/jdk/instances/jdk1.6.0/jre/lib/i386/client:/usr/jdk/instances/jdk1.6.0/jre/lib/i386:/usr/jdk/instances/jdk1.6.0/lib/i386:/usr/jdk/packages/lib/i386:/lib:/usr/lib com.sun.enterprise.glassfish.bootstrap.ASMain -domainname domain1 -asadmin-args start-domain -instancename server -verbose false -debug false -asadmin-classpath $S1AS_HOME/modules/admin-cli.jar -asadmin-classname com.sun.enterprise.admin.cli.AsadminMain -upgrade false -type DAS -domaindir $S1AS_HOME/domains/domain1

Thanks,
-Jagadish

On Tue, 2010-10-12 at 09:25 -0500, Tom Mueller wrote:
> 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
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>