JMX metrics for JIRA caches


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible


This article describes how to expose JMX MBeans for JIRA caches.

What is JMX?

JMX (Java Management Extensions) is a technology for monitoring and managing Java applications. JMX uses objects called MBeans (Managed Beans) to expose data and resources from your application. For large instances of JIRA Server or JIRA Data Center, enabling JMX allows you to more easily monitor the consumption of application resources. This enables you to make better decisions about how to maintain and optimize machine resources.

Supported platforms

Currently this feature is present in both: JIRA Server and JIRA Data Center starting from 7.9 (ER - 7.6.5)

JIRA Server

Enabling storing caches metrics in JIRA

This mechanism is turned off by default. To start collecting metrics on you will need to provide the following arguments when starting JIRA:

-Datlassian.cache.statistics.enabled=true -Datlassian.cache.jmx=true

Note: this feature cannot be enabled with > System > JMX monitoring.

Cache metrics collected by JIRA

The following table lists metrics collected for JIRA Server (for more details you may refer to Guava Cache documentation).

All of them are grouped in com.google.common.cache->CacheStatistics→JIRA Cache Manager.

Metric

Description

AverageLoadPenaltyReturns the average time spent loading new values.
EvictionCountReturns the number of times an entry has been evicted.

HitCount

Returns the number of times cache lookup methods have returned a cached value
HitRateReturns the ratio of cache requests which were hits.
LoadCountReturns the total number of times that cache lookup methods attempted to load new values.
LoadExceptionCountReturns the number of times cache lookup methods threw an exception while loading a new value.
LoadExceptionRateReturns the ratio of cache loading attempts which threw exceptions.
LoadSuccessCountReturns the number of times cache lookup methods have successfully loaded a new value.
MissCountReturns the number of times cache lookup methods have returned an uncached (newly loaded) value, or null.
MissRateReturns the ratio of cache requests which were misses.
RequestCountReturns the number of times cache lookup methods have returned either a cached or uncached value.
SizeReturns the number of entries in this cache.
TotalLoadTimeReturns the total number of nanoseconds the cache has spent loading new values.


Jira Data Center

Enabling storing caches metrics in JIRA

This mechanism is turned off by default. To start collecting metrics on you will need to provide the following arguments when starting JIRA:

-Datlassian.cache.jmx=true

Note: this feature cannot be enabled with > System > JMX monitoring.

Cache metrics collected by JIRA

The following table lists metrics collected for JIRA Server (for more details you may refer to Ehcache documentation).

All of them are grouped in net.sf.ehcache->CacheStatistics→JIRA Cache Manager.

Metric

Description

Metric

Description

CacheHitPercentageReturns the percentage of cache accesses that found a requested item in the cache.
CacheHitsReturns the number of times a requested item was found in the cache.

CacheMissPercentage

Returns the percentage of cache accesses that did not find a requested element in the cache.
CacheMissesReturns the number of times a requested item was not found in the cache.
DiskStoreObjectCountReturns the number of objects in the disk store.
InMemoryHitPercentageReturns the percentage of cache accesses that found a requested item cached in-memory.
InMemoryHitsReturns the number of times a requested item was found in the memory store.
InMemoryMissesReturns the number of times a requested item was not found in the memory store.
MemoryStoreObjectCountReturns the number of objects in the memory store.
ObjectCountReturns the number of elements stored in the cache.
OffHeapHitPercentageReturns the percentage of cache accesses that found a requested item cached off-heap.
OffHeapHitsReturns the number of times a requested item was found in the off-heap store.
OffHeapMissesReturns the total number of times a requested item was not found in the off-heap store.
OffHeapStoreObjectCountReturns the number of objects in the off-heap store.
OnDiskHitPercentageReturns the percentage of cache accesses that found a requested item cached on disk.
OnDiskHitsReturns the number of times a requested item was found in the disk store.
OnDiskMissesReturns the number of times a requested item was not found in the disk store.
WriterMaxQueueSizeReturns the maximum size of the write-behind queue, if any.
WriterQueueLengthReturns the size of the write-behind queue, if any.

Additional details

For additional information about JMX functionality and configuration of Jira monitoring using the JMX interface, please refer to the "Live monitoring using the JMX interface" user guide.


Last modified on Nov 14, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.