You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2017/03/02 07:59:45 UTC
[jira] [Created] (IGNITE-4766) Relax worker thread wakeup logic in
StipedExecutor
Vladimir Ozerov created IGNITE-4766:
---------------------------------------
Summary: Relax worker thread wakeup logic in StipedExecutor
Key: IGNITE-4766
URL: https://issues.apache.org/jira/browse/IGNITE-4766
Project: Ignite
Issue Type: Task
Components: general
Affects Versions: 1.0
Reporter: Vladimir Ozerov
Assignee: Vladimir Ozerov
Fix For: 2.0
*Problem*
Worker threads in {{StripedExecutor}} have {{parked}} state flag. When set to {{true}} NIO threads will call {{LockSupport.unpark}} after submitting new task to a queue.
The problem is that this flag is only changed by worker thread. Thus, if NIO worker submitted a new task and called {{unpark}}, worker will clean up {{parked}} state only after real wake up what may take microseconds. All subsequent submits from NIO thread occurred during this time will also invoke {{unpark}} thus generating high contention on the underlying OS primitives. Namely, condition variables which ultimately delegates to {{futex}} on Linux.
*Solution*
NIO threads must be able to clear {{parked}} state as well. Some CAS magic will be required there. This way we will minimize number of {{unapark}} calls.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)