Infinispan HotRod Connector Metrics: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(34 intermediate revisions by the same user not shown)
Line 2: Line 2:


* [[Infinispan Hot Rod#HotRod_Connector|The HotRod Connector]]
* [[Infinispan Hot Rod#HotRod_Connector|The HotRod Connector]]
* [[Infinispan Metrics Reference#HotRod_Connector_Statistics|Infinispan Metrics Reference]]
* [[Infinispan Monitoring]]


=Overview=
=Overview=
This article describes the statistics that can be obtained from the server-side [[Infinispan Hot Rod#HotRod_Connector|HotRod connector]]. Client side statistics are described in the "[[HotRod Client Metrics]]" article.


=Bytes Read and Written=
=Bytes Read and Written=


The HotRod connector exposes a cumulative counter for bytes read from the connector and bytes written to the connector. The metrics are exposed as longs.  
The HotRod connector exposes a cumulative counter for bytes read from the connector and bytes written to the connector. The metrics are exposed as longs.  
Reference: [[JDG_6_JMX#totalBytesRead|JDG 6 JMX]] [[JDG 6 CLI]] [[JDG 7 JMX]] [[JDG 7 CLI]].
=CLI Metrics=
=JDG 6 JMX Metrics=
The JMX MBean Object Name: "jboss.datagrid-infinispan:type=Server,name=HotRod,component=Transport"
====hostName====
====port====
====idleTimeout====
====numberOfGlobalConnections====
====numberOfLocalConnections====
====numberWorkerThreads====
====receiveBufferSize====
====sendBufferSize====
====tcpNoDelay====
====totalBytesWritten====
=JDG 7 JMX Metrics=
The JMX MBean Object Name: "jboss.as:subsystem=datagrid-infinispan-endpoint,hotrod-connector=hotrod-connector"
====bytesRead====
Returns the number of bytes read from this HotRod connector. Type: Long.
====bytesWritten====
Returns the number of bytes written to this HotRod connector. Type: Long.
====cacheContainer====
The cache container to use. Type: String.
====idleTimeout====


The timeout for idle connections. Type: Long.
The counters can be used to calculate the read and write rate, in bytes/second. It is preferable to expose these metrics as a rate per second, as it gives an indication of the load on the node. Some monitoring solutions allow the rate to be calculated automatically (see [[DataDog_and_JMX#Counter|Data Dog counters]]).


====ignoredCaches====
{|
| [[JDG_6_JMX#totalBytesRead|JDG 6 JMX]] || [[JDG 6 CLI#bytesRead|JDG 6 CLI]]
|-
| [[JDG 7 JMX#bytesRead|JDG 7 JMX]] ||  [[JDG 7 CLI#bytesRead|JDG 7 CLI]]
|-
|}


List of caches ignored for this connector. Type: String array.
=Number of Active Client Connections=


====name====
In JDG 6, the HotRod connector reports the number of active client connections ("numberOfLocalConnections") this node endpoint, as integer. It also reports the number of active client connections in the cluster. For the cluster-wide count, the node will make remote calls to aggregate results, so latency might have an impact on the speed of calculation of this attribute.


The name of the connector. Type: String.
<font color=red>The metric seemed to have gone away in JDG 7, clarify.</font>


====receiveBufferSize====
{|
| [[JDG_6_JMX#numberOfLocalConnections |JDG 6 JMX]] || [[JDG 6 CLI#not_exposed|JDG 6 CLI]]
|-
| [[JDG 7 JMX#not_exposed|JDG 7 JMX]] ||  [[JDG 7 CLI#not_exposed|JDG 7 CLI]]
|-
|}


Size of the receive buffer. Type: Long.
=Worker Thread Count=


====sendBufferSize====
The number of worker threads this connector was configured with, as integer. The value may be undefined, in which case it means the number of worker threads is the hardcoded default.


Size of the send buffer. Type: Long.
{|
| [[JDG_6_JMX#numberWorkerThreads|JDG 6 JMX]] || [[JDG 6 CLI#worker-threads|JDG 6 CLI]]
|-
| [[JDG 7 JMX#workerThreads|JDG 7 JMX]] || [[JDG 7 CLI#worker-threads|JDG 7 CLI]]
|-
|}


====socketBinding====
=HotRod Activity Logging=


The socket binding to use for this connector. Type: String.
Since JDG 7 it is possible to log Hot Rod operations. Logging it is disabled by default, but it can be enabled it by changing the corresponding handler's log level to TRACE, as commented in clustered.xml:


====tcpNodelay====
<pre>
<logger category="org.infinispan.server.hotrod.logging.HotRodAccessLoggingHandler">
    <!-- Set to TRACE to enable access logging for hot rod or use DMR -->
    <level name="INFO"/>
    <handlers>
        <handler name="HR-ACCESS-FILE"/>
    </handlers>
</logger>
</pre>


Whether to use TCP NO_DELAY. Type: Boolean.
Hot Rod operations will be logged in hotrod-access.log as follows:


====workerThreads====
<pre>
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:57:57.906] "PutRequest -" "OK" [B0x033e04686f6765 35 5 22 ms
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:57:59.810] "GetRequest -" "OK" [B0x033e04686f6765 20 18 1 ms
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:58:04.707] "RemoveRequest -" "OK" [B0x033e04686f6765 20 5 3 ms
</pre>


The number of worker threads to use for this connector. Type: Integer.
<font color=red>Note: not tested. After testing, remove this.</font>

Latest revision as of 16:01, 3 November 2016

Internal

Overview

This article describes the statistics that can be obtained from the server-side HotRod connector. Client side statistics are described in the "HotRod Client Metrics" article.

Bytes Read and Written

The HotRod connector exposes a cumulative counter for bytes read from the connector and bytes written to the connector. The metrics are exposed as longs.

The counters can be used to calculate the read and write rate, in bytes/second. It is preferable to expose these metrics as a rate per second, as it gives an indication of the load on the node. Some monitoring solutions allow the rate to be calculated automatically (see Data Dog counters).

JDG 6 JMX JDG 6 CLI
JDG 7 JMX JDG 7 CLI

Number of Active Client Connections

In JDG 6, the HotRod connector reports the number of active client connections ("numberOfLocalConnections") this node endpoint, as integer. It also reports the number of active client connections in the cluster. For the cluster-wide count, the node will make remote calls to aggregate results, so latency might have an impact on the speed of calculation of this attribute.

The metric seemed to have gone away in JDG 7, clarify.

JDG 6 JMX JDG 6 CLI
JDG 7 JMX JDG 7 CLI

Worker Thread Count

The number of worker threads this connector was configured with, as integer. The value may be undefined, in which case it means the number of worker threads is the hardcoded default.

JDG 6 JMX JDG 6 CLI
JDG 7 JMX JDG 7 CLI

HotRod Activity Logging

Since JDG 7 it is possible to log Hot Rod operations. Logging it is disabled by default, but it can be enabled it by changing the corresponding handler's log level to TRACE, as commented in clustered.xml:

<logger category="org.infinispan.server.hotrod.logging.HotRodAccessLoggingHandler">
    <!-- Set to TRACE to enable access logging for hot rod or use DMR -->
    <level name="INFO"/>
    <handlers>
        <handler name="HR-ACCESS-FILE"/>
    </handlers>
</logger>

Hot Rod operations will be logged in hotrod-access.log as follows:

(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:57:57.906] "PutRequest -" "OK" [B0x033e04686f6765 35 5 22 ms
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:57:59.810] "GetRequest -" "OK" [B0x033e04686f6765 20 18 1 ms
(HotRodServerWorker-7-1) /127.0.0.1:47960 [2016-10-28T13:58:04.707] "RemoveRequest -" "OK" [B0x033e04686f6765 20 5 3 ms

Note: not tested. After testing, remove this.