You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2017/04/06 10:43:41 UTC

[jira] [Updated] (IGNITE-4766) Relax worker thread wakeup logic in StipedExecutor

     [ https://issues.apache.org/jira/browse/IGNITE-4766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Ozerov updated IGNITE-4766:
------------------------------------
    Fix Version/s:     (was: 2.0)
                   2.1

> 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.9
>            Reporter: Vladimir Ozerov
>            Assignee: Vladimir Ozerov
>             Fix For: 2.1
>
>
> *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)