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
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.
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 }
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]
This can be reviewed here: http://documentation-devel.engineering.redhat.com/site/documentation/en-US/JBoss_Enterprise_Application_Platform/6.3/html-single/Administration_and_Configuration_Guide/index.html#chap-Infinispan See sections 14.1, 14.2, 14.3, 14.3.1, 14.3.2