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

Clarification of buffer size threshold calculation in BufferDebloater

    XMLWordPrintableJSON

Details

    Description

      It looks like that the variable `skipUpdate` in BufferDebloater#recalculateBufferSize is calculated in a not obvious way.

      For example if `taskmanager.network.memory.buffer-debloat.threshold-percentages` is set to 50(means 50%) then it will be something like:

      • 32000 -> 16000(possible)
      • 32000 -> 17000(not possible)
      • 16000 -> 24000(not possible) - but 16000 + 50%  = 24000
      • 16000 -> 32000(only this possible)

      This happens because the algorithm takes into account only the largest value. So in example of `16000 -> 24000` it would calculate 50% of 24000 so only transit from 12000 -> 24000 possible. 

      In general, this approach is not so bad especially on small values (instead of 256  ->374, the minimum possible transit is 256 -> 512). But we should clarify it somewhere with test or javadoc or both. Also, we can discuss changing this algorithm to a more natural implementation.

       

      Attachments

        Activity

          People

            akalashnikov Anton Kalashnikov
            akalashnikov Anton Kalashnikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: