[
https://issues.apache.org/jira/browse/IGNITE-6923?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16304320#comment-16304320
]
ASF GitHub Bot commented on IGNITE-6923:
----------------------------------------
GitHub user alex-plekhanov opened a pull request:
https://github.com/apache/ignite/pull/3292
IGNITE-6923 Optimize metrics calculation
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/alex-plekhanov/ignite IGNITE-6923
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/3292.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #3292
----
commit 6a887ada0b76d62c34b871f760f79838215e6cbc
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-19T14:44:06Z
IGNITE-6923 Optimized nonHeapMemoryUsed
commit d1742f7c598e8029db58f48b0b0ab3cf463a55d9
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-20T16:13:34Z
IGNITE-6923 getTotalPartitionsCount, getRebalancingPartitionsCount
optimization
commit 1bff257d4da4bdf33da1824a193ba6d202b8f9ac
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-22T08:56:36Z
IGNITE-6923 Cluster metrics optimization (proxy class implemented)
commit 4980e29e7145a8ea9f53e51ba7d0ae67f6709d1b
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-25T08:40:24Z
IGNITE-6923 Partitions metrics optimization
commit 6c53ac5a66cc951f8dfa12dcf2d9bc6953e3c6ed
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-26T12:57:01Z
IGNITE-6923 Cache metrics optimization
commit e77096ec6ec8c6b5128b83a5be41c61d73e9a169
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-26T12:58:30Z
IGNITE-6923 Cache metrics optimization
commit 9bb904f445c558f5bf044d6cbafd2a9aeb9d4eb7
Author: Aleksey Plekhanov <plehanov.alex@...>
Date: 2017-12-27T07:48:56Z
IGNITE-6923 Disable cache metrics update flag
----
> Cache metrics are updated in timeout-worker potentially delaying critical
> code execution due to current implementation issues.
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: IGNITE-6923
> URL: https://issues.apache.org/jira/browse/IGNITE-6923
> Project: Ignite
> Issue Type: Improvement
> Affects Versions: 2.3
> Reporter: Alexei Scherbakov
> Assignee: Aleksey Plekhanov
> Labels: iep-6
> Fix For: 2.4
>
>
> Some metrics are using cache iteration for calculation. If number of caches
> rather large this can be slow.
> Similar code is running in discovery thread.
> See stack trace for example.
> {noformat}
> "grid-timeout-worker-#39%DPL_GRID%DplGridNodeName%" #152 prio=5 os_prio=0
> tid=0x00007f1009a03000 nid=0x5caa runnable [0x00007f0f059d9000]
> java.lang.Thread.State: RUNNABLE
> at java.util.HashMap.containsKey(HashMap.java:595)
> at java.util.HashSet.contains(HashSet.java:203)
> at
> java.util.Collections$UnmodifiableCollection.contains(Collections.java:1032)
> at
> org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$3.apply(IgniteCacheOffheapManagerImpl.java:339)
> at
> org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl$3.apply(IgniteCacheOffheapManagerImpl.java:337)
> at
> org.apache.ignite.internal.util.lang.gridfunc.TransformFilteringIterator.hasNext:@TransformFilteringIterator.java:90)
> at
> org.apache.ignite.internal.util.lang.GridIteratorAdapter.hasNext(GridIteratorAdapter.java:45)
>
> at
> org.apache.ignite.internal.processors.cache.IgniteCacheOffheapManagerImpl.cacheEntriesCount(IgniteCacheOffheapManagerImpl.java:293)
> at
> org.apache.ignite.internal.processors.cache.CacheMetricsImpl.getOffHeapPrimaryEntriesCount(CacheMetricsImpl.java:240)
> at
> org.apache.ignite.internal.processors.cache.CacheMetricsSnapshot.<init>(CacheMetricsSnapshot.java:271)
>
> at
> org.apache.ignite.internal.processors.cache.GridCacheAdapter.localMetrics(GridCacheAdapter.java:3217)
>
> at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$7.cacheMetrics(GridDiscoveryManager.java:1151)
> at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$7.nonHeapMemoryUsed(GridDiscoveryManager.java:1121)
> at
> org.apache.ignite.internal.managers.discovery.GridDiscoveryManager$7.metrics(GridDiscoveryManager.java:1087)
>
> at
> org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode.metrics(TcpDiscoveryNode.java:269)
>
> at
> org.apache.ignite.internal.IgniteKernal$3.run(IgniteKernal.java:1175)
> at
> org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$CancelableTask.onTimeout(GridTimeoutProcessor.java:256)
> - locked <0x00007f115f5bf890> (a
> org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$CancelableTask)
> at
> org.apache.ignite.internal.processors.timeout.GridTimeoutProcessor$TimeoutWorker.body(GridTimeoutProcessor.java:158)
> at
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
> at java.lang.Thread.run(Thread.java:748)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)