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

Mitigate the performance impact of Selector.wakeup()

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 1.2.0.CR1
    • 1.0.0.GA
    • nio-impl
    • None
    • Medium

      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.

              dlloyd@redhat.com David Lloyd
              dlloyd@redhat.com David Lloyd
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: