Oracle SOA Suite 11g Performance Tuning Cookbook
上QQ阅读APP看书,第一时间看更新

Monitoring the JVM memory usage

Many of the common causes of performance problems have their roots in memory management, so monitoring the memory usage of the servers in your SOA Suite domain can alert you to many performance problems before they become problematic. In this recipe, we will see how we can view graphs of the current and historical memory usage of our SOA Suite 11g application.

Getting ready

You will need to install Oracle SOA Suite and the Hyperic HQ server and agents for this recipe. Both Hyperic HQ and Oracle SOA Suite will need to be running. You will also need the login credentials for the Hyperic HQ console.

How to do it...

Follow these steps to monitor the memory usage of our SOA Suite 11g application.

  1. Log in to the Hyperic HQ console.
  2. Open the Resources menu, and select Browse.
  3. Select the platform that has the server you want to monitor, which should be one of your SOA Suite managed servers.
  4. On the left-hand side of the Resources panel, select the WebLogic managed server that you wish to monitor.
  5. The graph pane in the center of the page contains the graph for the JVM Free Memory metric.
  6. Use the time settings at the top of the graph panel to select the time period you are interested in.
  7. Click on the graph title to view a more detailed graph.

How it works...

The Hyperic HQ agent periodically connects to the WebLogic server instances that are in its inventory, and uses the JMX service to obtain metrics on a number of measurements, including the JVM free memory. It reports this data back to the server, which stores it in its database. We can then view this collected data by using the Hyperic console.

JVM free memory is an interesting metric to monitor, although one that is hard to set up alerting on, because of the nature of JVM memory management; memory will be used up until there is none free, and then the garbage collector will kick in and free up a large chunk. This gradual use of memory, and then a sudden freeing up results in the familiar saw tooth pattern of JVM memory graphs, which are described in other chapters. This does not mean that monitoring the free JVM memory is useless, as we can identify memory leaks by the fact that the saw tooth pattern frees up less and less memory each time the garbage collector is run.

There's more...

Since memory usage patterns can change a lot depending upon the usage of the application, it is very useful to have an understanding of what the graph of JVM free memory looks like during normal use. If you know what the usage typically looks like on a Monday morning, you are in a much better position to identify an abnormally high or low memory usage on a particular Monday morning.

See also

  • The Installing the Hyperic server, Installing Hyperic agents, and Configuring Hyperic to monitor SOA Suite 11g recipes
  • The Monitor garbage collection using jstat recipe in Chapter 1, Identifying Problems