GitHub user sunnychanwork opened a pull request:
https://github.com/apache/ignite/pull/3152
Ignite 7083
The Cache Partition Exchange Manager kept a copy of the already completed
exchange. However, we have found that it uses a significant amount of memory.
Upon further investigation using heap dump we have found that a large amount of
memory is used by the CachePartitionFullCountersMap. We have also observed in
most cases, these maps contains only 0s.
Therefore I propose an optimization for this: Initially the long arrays to
store initial update counter and update counter in the CPFCM will be null, and
when you get the value and see these tables are null then we will return 0 for
the counter. We only allocate the long arrays when there is any non-zero
updates to the the map.
In our tests, the amount of heap used by GridCachePartitionExchangeManager
was around 70MB (67 copies of these CPFCM), after we apply the optimization it
drops to around 9MB.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/sunnychanwork/ignite IGNITE-7083
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/ignite/pull/3152.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 #3152
----
commit 3ddb7e5cec7635cf9dfb7f527fc176784506feb4
Author: Sunny Chan, CLSA <[email protected]>
Date: 2017-12-06T03:17:01Z
IGNITE-7083 Optimize memory usage for CachePartitionFullCountersMap
commit b7a5641eada345c40518b7d28119918af34ab611
Author: Sunny Chan, CLSA <[email protected]>
Date: 2017-12-06T03:23:44Z
IGNITE-7083 Remove unused imports
commit 71d6e5fb6af830867a128c2784c18ac9a31b92ae
Author: Sunny Chan, CLSA <[email protected]>
Date: 2017-12-06T03:25:11Z
IGNITE-7083 Remove excess new line
----
---