[
https://issues.apache.org/jira/browse/IGNITE-2408?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15119133#comment-15119133
]
Ilya Lantukh edited comment on IGNITE-2408 at 1/27/16 12:18 PM:
----------------------------------------------------------------
Current implementation has quadratic dependency from
IGNITE_ATOMIC_DEFERRED_ACK_BUFFER_SIZE property value. With higher value
addResponse() method will take more relative time.
I've tested perfromance of both suggested solutions. Even with 100+ threads
running, solution with synchronized + ArrayList shows slightly better
performance.
Please review my pull request: https://github.com/apache/ignite/pull/428/files
was (Author: ilantukh):
Current implementation has quadratic dependency from
IGNITE_ATOMIC_DEFERRED_ACK_BUFFER_SIZE property value. With higher value
addResponse() method will take more relative time.
I've tested perfromance of both suggested solutions. Even with 100+ threads
running, solution with synchronized + ArrayList shows slightly better
performance.
Please review my pull request.
> Hot spot in GridDhtAtomicCache$DeferredResponseBuffer.addResponse()
> -------------------------------------------------------------------
>
> Key: IGNITE-2408
> URL: https://issues.apache.org/jira/browse/IGNITE-2408
> Project: Ignite
> Issue Type: Sub-task
> Components: cache
> Affects Versions: 1.5.0.final
> Reporter: Vladimir Ozerov
> Assignee: Ilya Lantukh
> Priority: Critical
> Fix For: 1.6
>
>
> Problems:
> 1) DeferredResponseBuffer.respVers is ConcurrentLinkedDeque8 and size()
> method is called on it. It is O(N) for this collection, hence the hot spot.
> 2) We use read-write lock for very small updates. This is not efficient.
> Probably we should simply switch to (sycnhronized + ArrayList) and this will
> be enough.
> If synchronized is not an option, at the very least we must use collection
> with O(1) size or maintain separate counter (e.g. LongAccumulator).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)