[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16993207#comment-16993207 ] zhijiang commented on FLINK-14952: -- As [~kevin.cyj] mentioned above, the current blocking partition with file type has some potential concern for memory overhead. I created a separate ticket FLINK-15187 for tracking this issue and I do not tag it as a blocker for release-1.10 ATM. > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16993168#comment-16993168 ] zhijiang commented on FLINK-14952: -- Generally we want to provide a better performance setting as a default config. But considering the mmap way might bring unstable concern in resource framework cluster, then I also prefer to adjust the default config option "*taskmanager.network.bounded-blocking-subpartition-type*" from `auto` to `file` mode. Furthermore we can also supplement some descriptions of limitation/concerns for `mmap` way in options. Then when users want to enable `mmap` way for better performance, they are aware of the respective risks and the scenarios. > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16989448#comment-16989448 ] Yingjie Cao commented on FLINK-14952: - [~gjy] By "FILE-FILE" mode, I mean using BoundedBlockingSubpartitionType.FILE. As explained by [~pnowojski], results are written to a file and read from a file using read/write API of FileChannel. When reading from files, two buffers are needed by each subpartition to store the read data. For MMAP read mode, the extra read buffers are not needed. > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16988046#comment-16988046 ] Piotr Nowojski commented on FLINK-14952: Initially the {{BlockingBoundedPartition}} was supposed to be working purely using mmap: 1. Results are produced and written to a mmap'ed file, from which they are being read This had some blocking issues and was replaced by: 2. Results are written to a file directly, but read using mmap (improves performance when reading the same partition multiple times). This is what we are calling "mmap"/"MMAP" mode in this ticket. 3. Results are written to a file and read from a file, without using mmap at all. "file" or "FILE-FILE" mode > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16988013#comment-16988013 ] Gary Yao commented on FLINK-14952: -- {quote}Maybe there's another choice we can consider - using the FILE-FILE mode in the first place. The FILE-FILE mode can also leverage the capability of OS page cache and the only problem is that it uses some unpooled heap memory for reading, which has a potential of OOM. If we can manage those memory in the future, there should be no problem with FILE-FILE mode.{quote} [~kevin.cyj] Can you explain what FILE-FILE mode means? > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16987954#comment-16987954 ] Piotr Nowojski commented on FLINK-14952: It would be nice to try to keep {{MMAP}} as default for non yarn deployments, but if that's non trivial +1 for setting {{FILE}} as the default. > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16984103#comment-16984103 ] Yingjie Cao commented on FLINK-14952: - > Doesn't this defeat the purpose of using mmap in the first place? For it to > be beneficial two different readers of the mmap'ed region would have to > closely follow one another, right? You are right, if we decide to manage the mmapped region, we need to consider when and which region to recycle. Implementing a memory management algorithm is possible but can be complicated, currently, OS does it for us. Maybe there's another choice we can consider - using the FILE-FILE mode in the first place. The FILE-FILE mode can also leverage the capability of OS page cache and the only problem is that it uses some unpooled heap memory for reading, which has a potential of OOM. If we can manage those memory in the future, there should be no problem with FILE-FILE mode. > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16983521#comment-16983521 ] Piotr Nowojski commented on FLINK-14952: {quote}For example, we can implement a rolling map and release the previous region before mapping next region and restrict the total size of mmapped memory can be used by a single TM.{quote} [~kevin.cyj] doesn't this defeat the purpose of using mmap in the first place? For it to be beneficial two different readers of the mmap'ed region would have to closely follow one another, right? {quote}If users want to disable container killing, `yarn.nodemanager.pmem-check-enabled=false` could be used. {quote} Assuming that cluster is properly configured I guess this is a valid option. > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16983442#comment-16983442 ] Yang Wang commented on FLINK-14952: --- [~pnowojski] I think it is not easy to disable mmap memory accounting in yarn. Even we set the `yarn.nodemanager.container-monitor.procfs-tree.smaps-based-rss.enabled=true`, the NodeManager calculates mmaped pages as consumed. So there is no way to disable mmap memory accounting. If users want to disable container killing, `yarn.nodemanager.pmem-check-enabled=false` could be used. [~kevin.cyj] If we can control the memory used by mmap, i think it is better solution. The memory for mmap should be allocated from Yarn to avoid killing. > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16983397#comment-16983397 ] Yingjie Cao commented on FLINK-14952: - Can we manage the memory mapped region and restrict its size? For example, we can implement a rolling map and release the previous region before mapping next region and restrict the total size of mmapped memory can be used by a single TM. > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16983233#comment-16983233 ] Piotr Nowojski commented on FLINK-14952: What options do we have? I think there is no way without cgroups to control the memory usage of the mmap, *or is there*? If not, we have only the following options: # Disallow mmap for yarn # Disable mmap memory accounting/container killing in yarn I think there are some options to achieve the 2., but probably require user to change yarn configuration? So maybe the default should be to not use mmap for yarn, but document how to enable it? > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16983106#comment-16983106 ] Yang Wang commented on FLINK-14952: --- [~pnowojski] FYI, all the memory used by Flink TaskManager should be counted and allocate from Yarn ResourceManager. Otherwise, it may be killed by Yarn NodeManager. The NodeManager tracks the memory usage of the TaskManager process tree. It is usually rss mem, read the value from `/proc/\{pid}/stat'. Yarn NodeManager does not use cgroup to set the memory limit, it starts a `ContainersMonitor` thread to monitor the memory usage of each container. If it overused, the container will be killed by NodeManager and get the log "is running beyond physical memory limits". > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16982614#comment-16982614 ] Andrey Zagrebin commented on FLINK-14952: - At the moment, we do not explicitly account for this memory usage in our new memory model for the Flink process, except that in general this kind of things can be accounted for in a config option for the framework off-heap abs memory ([https://jira.apache.org/jira/browse/FLINK-14637]). it would be nice to understand how to manage this memory usage by mmap firstly to account for it in some better way. > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14952) Yarn containers can exceed physical memory limits when using BoundedBlockingSubpartition.
[ https://issues.apache.org/jira/browse/FLINK-14952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16982590#comment-16982590 ] Chesnay Schepler commented on FLINK-14952: -- would it be sufficient to document the config option? [~azagrebin] will the new memory management handle this in a better way? > Yarn containers can exceed physical memory limits when using > BoundedBlockingSubpartition. > - > > Key: FLINK-14952 > URL: https://issues.apache.org/jira/browse/FLINK-14952 > Project: Flink > Issue Type: Bug > Components: Deployment / YARN, Runtime / Network >Affects Versions: 1.9.1 >Reporter: Piotr Nowojski >Priority: Blocker > Fix For: 1.10.0 > > > As [reported by a user on the user mailing > list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/CoGroup-SortMerger-performance-degradation-from-1-6-4-1-9-1-td31082.html], > combination of using {{BoundedBlockingSubpartition}} with yarn containers > can cause yarn container to exceed memory limits. > {quote}2019-11-19 12:49:23,068 INFO org.apache.flink.yarn.YarnResourceManager > - Closing TaskExecutor connection container_e42_1574076744505_9444_01_04 > because: Container > [pid=42774,containerID=container_e42_1574076744505_9444_01_04] 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. > {quote} > 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: > {noformat} > taskmanager.network.bounded-blocking-subpartition-type: file > {noformat} -- This message was sent by Atlassian Jira (v8.3.4#803005)