Bug 1088905 - Missing documentation for statistics-enabled option for infinispan subsystem
Summary: Missing documentation for statistics-enabled option for infinispan subsystem
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Documentation
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER4
: EAP 6.3.0
Assignee: Russell Dickenson
QA Contact: Richard Janík
URL:
Whiteboard:
Depends On:
Blocks: eap63-beta-blockers
TreeView+ depends on / blocked
 
Reported: 2014-04-17 12:07 UTC by Richard Janík
Modified: 2014-08-14 15:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-28 15:43:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Comment 1 Russell Dickenson 2014-05-07 04:54:07 UTC
I have begun writing some notes on this feature [1]. I have looked over the dev BZ ticket [2], also the associated git pull request [3] and still can't find the specifics as to how these configuration parameters are used.

My research continues...

[1] https://mojo.redhat.com/docs/DOC-959587
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1025023
[3] https://github.com/jbossas/jboss-eap/pull/977

Comment 2 Russell Dickenson 2014-05-07 04:58:21 UTC
Richard,

I am looking for details as to how these options are configured. Given that you have tested this feature, can you help? I will continue looking through the pull request and other sources.

Comment 3 Richard Janík 2014-05-07 13:50:41 UTC
Sure, I'll try to explain how the options can be configured in detail:

Statistics collection can be enabled by setting the attribute statistics-enabled="true" for a given cache or cache-container. By default, this attribute is not present in configuration files, which has the same effect as if the attribute was explicitly set to false. There are two ways to configure statistics collection for Infinispan subsystem - you can enable it either by changing your configuration file (e.g. standalone.xml, standalone-ha.xml, domain.xml, ...) or by using the CLI.

Cache setting always overrides cache-container setting. In effect, this means that even when cache-container is configured with 'statistics-enabled="true"' and cache specific setting remains default for all caches under that cache-container (no statistics-enabled attribute in the configuration file) all caches under that container will have statistics collection disabled. The default cache-specific setting which translates to statistics-enabled="false" overrides the explicit "true" on the cache container. Thus, enabling statistics collection for a cache is only possible by enabling it explicitly. Enabling statistics collection for cache-container still has some effects (like registering JGroups statistics MBeans) so it isn't without use.

When modifying the configuration file, you need to add an attribute statistics-enabled=VALUE to the chosen cache-container or cache xml tag under infinispan subsystem, where VALUE is either "false" or "true". E.g.:

<replicated-cache name="sso" mode="SYNC" batching="true"/>
  ->
<replicated-cache name="sso" mode="SYNC" batching="true" statistics-enabled="true"/>

or

<cache-container name="singleton" aliases="cluster ha-partition" default-cache="default">
  ->
<cache-container name="singleton" aliases="cluster ha-partition" default-cache="default" statistics-enabled="true">

When using CLI, you can enable statistics collection for cache by running command
  /subsystem=infinispan/cache-container=CACHE_CONTAINER/CACHE_TYPE=CACHE:write-attribute(name=statistics-enabled,value=true)
where CACHE_CONTAINER is the preferred cache-container (e.g. web), CACHE_TYPE is the preferred cache type (e.g. distributed-cache) and CACHE is the cache name (e.g. dist); tab-completion is a friend. You can enable statistics collection for cache-container by running running command
  /subsystem=infinispan/cache-container=CACHE_CONTAINER:write-attribute(name=statistics-enabled,value=true)
where CACHE_CONTAINER is the preferred cache-container (e.g. web).

A reload will be needed for the change to take effect (":reload"). The changes can be verified by running commands:
  /subsystem=infinispan/cache-container=CACHE_CONTAINER/CACHE_TYPE=CACHE:read-attribute(name=statistics-enabled)
or
  /subsystem=infinispan/cache-container=CACHE_CONTAINER:read-attribute(name=statistics-enabled)
or in jconsole (use ${JBOSS_HOME}/bin/jconsole.sh). See [1] for sample usage.

I'm also adding Rado to CC so that he can correct me if I got something wrong.

I hope that helps.


[1]:

[standalone@localhost:9999 /] /subsystem=infinispan/cache-container=web:read-attribute(name=statistics-enabled)
{
    "outcome" => "success",
    "result" => undefined
}
[standalone@localhost:9999 /] /subsystem=infinispan/cache-container=web:write-attribute(name=statistics-enabled,value=true)
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}
[standalone@localhost:9999 /] :reload
{
    "outcome" => "success",
    "result" => undefined
}
[standalone@localhost:9999 /] /subsystem=infinispan/cache-container=web:read-attribute(name=statistics-enabled)
{
    "outcome" => "success",
    "result" => true
}

Comment 4 Russell Dickenson 2014-05-08 05:31:46 UTC
Documentation of "statistics-enabled option for infinispan subsystem" has been added to the Administration and Configuration Guide. I will set this BZ ticket to ON_QA when it is available for verification on the docs-devel site.

For ECS reference, the relevant topics are:
Chapter: Infinispan
  About Infinispan [4104]
  About Infinispan Statistics [30886]
  Section: Enable Infinispan Statistics
    Initial Text:
      Enable Infinispan Statistics [30890]
    Enable Infinispan Statistics in the Startup Configuration File [30891]
    Enable Infinispan Statistics from the Management CLI [30894]


Note You need to log in before you can comment on or make changes to this bug.