Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-2130

Improve epoll_wait processing in epoll proactor

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: proton-c-0.29.0
    • Fix Version/s: None
    • Component/s: proton-c
    • Labels:
      None

      Description

      Change epoll proactor to use epoll_wait() more efficiently and more canonically.

      Old way: each thread without work called epoll_wait() for 1 event.

      New: when known work exhausted, only one thread calls epoll_wait for N events and schedules work for the other threads to execute.

      The downside to the old way is that for each event, all threads in epoll_wait() are woken up but only one "wins" (obtaining the event to process) while the rest go back to sleep.

      In addition to wasteful use of cpu, this behavior also shows up in performance monitoring tools and clutters the analysis of profiling data and flame graphs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cliffjansen Clifford Jansen
                Reporter:
                cliffjansen Clifford Jansen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: