[ https://issues.apache.org/jira/browse/IGNITE-3018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15257772#comment-15257772 ]
Taras Ledkov commented on IGNITE-3018: -------------------------------------- New implementation use the cache for MD5 hash & cache of serialization results of a node's resolvers. Approximates times of call the RendezvousAffinityFunction.assignPartitions. The test replaces the last node 500 times: Test 100 nodes. Old: 74 ms +/- 11.202 ms; New: 24 ms +/- 8.604 ms; Test 200 nodes. Old: 152 ms +/- 15.816 ms; New: 64 ms +/- 13.450 ms; Test 300 nodes. Old: 231 ms +/- 16.516 ms; New: 103 ms +/- 15.008 ms; Test 400 nodes. Old: 310 ms +/- 18.549 ms; New: 181 ms +/- 28.094 ms; Test 500 nodes. Old: 385 ms +/- 15.571 ms; New: 264 ms +/- 36.831 ms; Test 600 nodes. Old: 464 ms +/- 16.210 ms; New: 383 ms +/- 73.448 ms; > Cache affinity calculation is slow with large nodes number > ---------------------------------------------------------- > > Key: IGNITE-3018 > URL: https://issues.apache.org/jira/browse/IGNITE-3018 > Project: Ignite > Issue Type: Bug > Components: cache > Reporter: Semen Boikov > Assignee: Taras Ledkov > Priority: Critical > Fix For: 1.6 > > > With large number of cache server nodes (> 200) RendezvousAffinityFunction > and FairAffinityFunction work pretty slow . > For RendezvousAffinityFunction.assignPartitions can take hundredes of > milliseconds, for FairAffinityFunction it can take seconds. > For RendezvousAffinityFunction most time is spent in MD5 hash calculation and > nodes list sorting. As optimization we can try to cache {partion, node} MD5 > hash or try another hash function. Also several minor optimizations are > possible (avoid unncecessary allocations, only one thread local 'get', etc). -- This message was sent by Atlassian JIRA (v6.3.4#6332)