Uploaded image for project: 'XNIO'
  1. XNIO
  2. XNIO-50

Mitigate the performance impact of Selector.wakeup()

    Details

    • Type: Feature Request
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0.0.GA
    • Fix Version/s: 1.2.0.CR1
    • Component/s: nio-impl
    • Labels:
      None
    • Estimated Difficulty:
      Medium

      Description

      Trustin has discovered through his research that Selector.wakeup() can significantly impact performace of selector operations. We need to modify XNIO's NIO provider to have a configurable wakeup policy. The following options should be available:

      • ALWAYS - always do a selector.wakeup().
      • OTHER_THREAD - only do a selector.wakeup() if the current thread is not the selector's thread.
      • NEVER - do not do a selector.wakeup().
      • AUTO - try to detect (based on the VM vendor, version etc.) what the right policy is.

      In addition, this policy should probably be applicable on an individual basis to modifying interest sets and adding a new channel to a selector's key set.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                dmlloyd David Lloyd
                Reporter:
                dmlloyd David Lloyd
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: