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

Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.

    XMLWordPrintableJSON

Details

    • Hide
      This changes the option key and default value for the type of BoundedBlockingSubpartition in batch jobs.

      The previous key `taskmanager.network.bounded-blocking-subpartition-type` was changed to `taskmanager.network.blocking-shuffle.type` now.

      And the respective option default value was also changed from `auto` to `file` for avoiding yarn killing task manager container when memory usage of mmap exceeds some threshold.
      Show
      This changes the option key and default value for the type of BoundedBlockingSubpartition in batch jobs. The previous key `taskmanager.network.bounded-blocking-subpartition-type` was changed to `taskmanager.network.blocking-shuffle.type` now. And the respective option default value was also changed from `auto` to `file` for avoiding yarn killing task manager container when memory usage of mmap exceeds some threshold.

    Description

      As reported by a user on the user mailing list, combination of using BoundedBlockingSubpartition with yarn containers can cause yarn container to exceed memory limits.

      2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager - Closing TaskExecutor connection container_e42_1574076744505_9444_01_000004 because: Container [pid=42774,containerID=container_e42_1574076744505_9444_01_000004] is running beyond physical memory limits. Current usage: 12.0 GB of 12 GB physical memory used; 13.9 GB of 25.2 GB virtual memory used. Killing container.

      This is probably happening because memory usage of mmap is not capped and not accounted by configured memory limits, however yarn is tracking this memory usage and once Flink exceeds some threshold, container is being killed.

      Workaround is to overrule default value and force Flink to not user mmap, by setting a secret (🤫) config option:

      taskmanager.network.bounded-blocking-subpartition-type: file
      

      Attachments

        Issue Links

          Activity

            People

              zjwang Zhijiang
              pnowojski Piotr Nowojski
              Votes:
              0 Vote for this issue
              Watchers:
              10 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 - 1h
                  1h