[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: Attachment: IGNITE_4766.patch > 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 > > Attachments: IGNITE_4766.patch > > > *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)
[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)
[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: Affects Version/s: (was: 1.0) 1.9 > 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.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)