Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-223

Performance: blocking in QueueKeeperHarvester

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • General
    • None
    • Operating System: All
      Platform: All

    • 1455

    Description

      Profiling shows about 20 seconds spent between ping() and run(), as evident in the captured profile (YJP 2014 EAP) during a 100 second run.

      At first glance, two things jump out: lock should be final and 'starving' should be volatile.

      Looking at the logic, I have to wonder if java.util.concurrent.CyclicBarrier wouldn't be more appropriate as opposed to lock:

      0) initialize barrier, parties=2
      1) run: when starved, set atomically starving to true, barrier.await()
      2) ping: check starved, if it's true, barrier.await()
      3) run: upon leaving barrier, set starting to false

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: