[
https://issues.redhat.com/browse/ISPN-12607?page=com.atlassian.jira.plugi...
]
Ryan Emerson commented on ISPN-12607:
-------------------------------------
The route cause of this issue is that the
[
MetricsCollector|https://github.com/infinispan/infinispan/blob/master/cor...
each mbean attribute individually. This results in multiple calls to
[
CacheContainerStatsImpl#getEnabledStats|https://github.com/infinispan/inf...],
each of which creates a {{StatsImpl}} instance that then calls
{{CacheMgmtInterceptor#getNumberOfEntries}}. Hence there is a call to size for each cache
with statistics enabled, for every mbean attribute exposed in
{{CacheContainerStatsImpl}}.
A simple workaround to this problem is to cache the collection of container stats so that
a single StatsImpl instance is reused for all calls to the mbean attributes.
Metrics degrade cluster performance
-----------------------------------
Key: ISPN-12607
URL:
https://issues.redhat.com/browse/ISPN-12607
Project: Infinispan
Issue Type: Bug
Affects Versions: 12.0.0.CR1, 11.0.8.Final
Reporter: Ryan Emerson
Priority: Major
The `/metrics` endpoint exposes Infinispan stats so that they can be periodically scraped
by monitoring tools such as Prometheus. However, these stats include calls to `size` which
does not perform well as the number of entries in a cache increase. Consequently, if
deploying DG in a k8 environment with Prometheus monitoring the DG cluster performance
rapidly declines as the number of entries in a cache increases due to time /resources
spent iterating the cache container.
This problem is only exasperated when muiltiple caches exist with many entries exist.
--
This message was sent by Atlassian Jira
(v8.13.1#813001)