Optimizing Data Retrieval Using JMX Tables

An option is available to speed up retrieval of Coherence MBean information (over JMX) by providing the aggregated MBean data in tabular form by using custom MBeans. By using custom MBeans the data is aggregated within the cluster and transmitted in the form of tabular data, rather than as individual attributes. This reduces the time taken to query the data.

This option is useful when monitoring large clusters (clusters with a large number of nodes, caches and/or services) using JMX, where the volume of data retrieved can affect the time taken to retrieve all the data, and thus limit the sampling rate for monitoring data.

Enabling this requires (unlike default JMX monitoring) that the custom MBeans (contained in a jar) are deployed and registered on all nodes in the cluster, and the monitoring is configured to query the custom MBeans.

The Oracle Coherence Documentation describes registering custom MBeans in a declarative manner in detail: https://docs.oracle.com/cd/E18686_01/coh.37/e18682/custom_mbeans.htm#COHMG4712.

To use this option:

Requirements:

The above should be applied to all Coherence cluster members so that the tangosol.coherence.mbeans system property is set to /sl-custom-mbeans.xml.

If you have configured your Coherence cluster correctly, you should be able to connect to the cluster using JConsole, and see in addition to the previous Cache, Service, and StorageManager MBeans the new custom CacheTable, ServiceTable, and StorageManagerTable MBeans.

After you configure your Monitor system to use the Custom MBeans and configure your monitoring system to use JMX as normal, uncomment the following line in the rtview.properties file:

# JMX TABLES

#

# Uncomment the line below to use the JMX tables custom mbeans

#maincollector.sl.rtview.cmd_line=-ocjmxtables

This sets the -ocjmxtables command line argument to be passed to the maincollector program (typically this is the Data Server), and the log file will then contain the following text at startup:

... using OC JMX Tabular Data

And at runtime, the previous JMX queries (as seen in the JMX Metrics Administration display in the MBean Query Key column of the RTView JMX Query Statistics table):

* Coherence:type=Cache,* 0 * -1 *-
* Coherence:type=Cluster 0 * -1 *-
* Coherence:type=Service,* 0 * -1 *-

become the following:

* Coherence:type=CacheTable,* 0 CacheTable -1 *-
* Coherence:type=ServiceTable,* 0 ServiceTable -1 *-
* Coherence:type=StorageManagerTable,* 0 StorageManagerTable -1 *-

The JMX queries should also have a reduced execution time leading to a reduced total (JMX Query) Execution time.