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

Convert requested buffers to overdraft buffers when pool size is decreased

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      As we discussed in FLINK-31610, new buffers can be requested only when "numOfRequestedMemorySegments + numberOfRequestedOverdraftMemorySegments < poolSize + maxOverdraftBuffersPerGate".

      Consider such a scenario, the CurrentPoolSize = 5numOfRequestedMemorySegments = 7maxOverdraftBuffersPerGate = 2. If numberOfRequestedOverdraftMemorySegments = 0, then 2 buffers can be requested now. 

      We should convert numberOfRequestedMemorySegments to numberOfRequestedOverdraftMemorySegments when poolSize is decreased. Further more, we can changes the definition of overdraft buffer from static to dynamic: 

      • When numberOfRequestedMemorySegments <= poolSize, all buffers are ordinary buffer
      • When numberOfRequestedMemorySegments > poolSize, the `ordinary buffer size = poolSize`, and `the overdraft buffer size = numberOfRequestedMemorySegments - poolSize`

      This allows us to remove numberOfRequestedOverdraftMemorySegments, which helps us simplify logic and maintain consistency.

       

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Weijie Guo Weijie Guo
            Weijie Guo Weijie Guo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment