[
https://issues.apache.org/jira/browse/IGNITE-29082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18120836#comment-18120836
]
Ignite TC Bot commented on IGNITE-29082:
----------------------------------------
{panel:title=Branch: [pull/13624/head] Base: [master] : No blockers
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/13624/head] Base: [master] : No new tests
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}{panel}
[TeamCity *--> Run :: All*
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=9372764&buildTypeId=IgniteTests24Java8_RunAll]
{color:#ffffff}tcbot-analysis-comment chainBuildId=9372764
rerunBuildIds=9373229{color}
> Fix repeated iterations over local partitions in cache metrics
> --------------------------------------------------------------
>
> Key: IGNITE-29082
> URL: https://issues.apache.org/jira/browse/IGNITE-29082
> Project: Ignite
> Issue Type: Improvement
> Reporter: Nikita Amelchev
> Assignee: Nikita Amelchev
> Priority: Minor
> Fix For: 2.19
>
> Attachments: JmhCacheMetricsBenchmark.java
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> {{CacheMetricsMessage(CacheMetrics)}} reads the 10 entries and partitions
> counters of {{CacheMetricsImpl}} through separate getters, and each getter
> calls {{getEntriesStat()}}, which iterates over all local partitions 4 times
> ({{offHeapEntriesCount()}}, {{localSize(null)}}, {{localSizeLong(null)}} and
> its own loop): 40 passes per snapshot instead of one. The snapshots are taken
> on each metrics update for every cache with statistics enabled, in the
> {{tcp-disco-msg-worker}} thread. The {{CacheSize}}, {{HeapEntriesCount}} and
> {{OffHeap*EntriesCount}} gauges also make 4 passes each on every read by
> metric exporters.
> JMH, 50 caches with 1024 partitions: snapshots of all caches 39.8 ms -> 2.45
> ms, reading of the cache metric registries 22.4 ms -> 3.9 ms.
> Also fix the {{CacheMetrics}} javadoc: {{getSize()}} and {{getKeySize()}}
> don't always return 0, {{getCacheSize()}} counts only primary copies.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)