Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-14214

Performance regression in TwoInputStreamOperator

    XMLWordPrintableJSON

Details

    Description

      https://issues.apache.org/jira/browse/FLINK-13051 introduced a performance regression visible for example here as a drop on August 30th (note that the later performance improvement is caused by serialisation improvement, which is unrelated to the previous slow down).

      Probable suspect is the following .isDone() check executed inside StreamTwoInputProcessor once per record:

      // to avoid starvation, if the input selection is ALL and availableInputsMask is not ALL,
      // always try to check and set the availability of another input
      // TODO: because this can be a costly operation (checking volatile inside CompletableFuture`
      //  this might be optimized to only check once per processed NetworkBuffer
      if (inputSelectionHandler.shouldSetAvailableForAnotherInput()) {
      	checkAndSetAvailable(1 - readingInputIndex);
      }
      

      Attachments

        Issue Links

          Activity

            People

              pnowojski Piotr Nowojski
              pnowojski Piotr Nowojski
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m