adam bien's blog

Glassfish EM Performance Monitor - First Smoke Test 📎

After the installation and launch of the Performance Monitor (see doc and some resources) I was somehow disappointed - it looks like VisualVM with a nice splash screen. Performance Monitor (PM) recognized my running Glassfish v2.1 instance - double-clicking on the instance opened a monitor-view - identical to the visualvm with CPU, heap, permgenspace, threads, loaded classes etc. The interesting part begins after connecting to GF using the JMX connection (e.g. localhost:8686).

It opens a tree-like view with the server as root node. You can activate the monitoring here for the following subsystems: ConnectorConnectionPool, ConnectorService, EJBContainer, HTTPService, JDBCConnectionPool, JMSService, JVM, ORB, ThreadPool, TransactionService, WebContainer. 

Setting the monitoring configuration to "Low" should be enough. After activating the configuration and waiting for few seconds, you should see the nodes appearing under the root.

Now you get the opportunity to visualize the behavior of connection pools, thread pools, JMS connection factories, WebServices etc. and search for possible bottlenecks. This information is invaluable for every load and performance test - it reminds me of the LoadRunner's monitoring capabilities. All the information is also available through the JConsole - but is lot harder to analyze and corelate.

What I miss, hovewer, is the detail view of EJB behavior like method invocation count, slowest, fastest methods etc. This information is already available in the Call Flow monitoring, so it should be somehow accessible. I wasn't able to find monitoring information for a single destination as well, only for the corresponding ConnectionFactory.

Sun Glassfish Enterprise Manager Performance Monitor (SGEMPM a nice name :-)) is a commercial extension, only available with support. From my perspective its a fair decision to make the SGEMPF commercial. If you have no money but time, you can go with JConsole and try to correlate the information manually. And if you want to save time, you can buy support and get the tool for free :-). SGEMPM is also able to monitor clusters - which makes it interesting for "mission critical" applications.