From yarn-issues-return-167329-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Sun May 5 03:36:04 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 4FE7918067E for ; Sun, 5 May 2019 05:36:04 +0200 (CEST) Received: (qmail 4348 invoked by uid 500); 5 May 2019 03:36:03 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 4190 invoked by uid 99); 5 May 2019 03:36:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 May 2019 03:36:02 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EFCE7E2B9C for ; Sun, 5 May 2019 03:36:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 1A93525817 for ; Sun, 5 May 2019 03:36:01 +0000 (UTC) Date: Sun, 5 May 2019 03:36:01 +0000 (UTC) From: "qiuliang (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (YARN-9437) RMNodeImpls occupy too much memory and causes RM GC to take a long time MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-9437?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16811= 738#comment-16811738 ]=20 qiuliang edited comment on YARN-9437 at 5/5/19 3:35 AM: -------------------------------------------------------- According to my understanding, there are two cases that may cause the compl= etedContainers in RMNodeImpl to not be released. 1. When RMAppAttemptImpl receives the CONTAINER_FINISHED(not amContainer) e= vent, it will add this container to justFinishedContainers. When processing= the AM heartbeat, RMAppAttemptImpl first sends the container in finishedCo= ntainersSentToAM to NM, and RMNodeImpl also removes these containers from t= he completedContainers. Then transfer the containers in justFinishedContain= ers to finishedContainersSentToAM and wait for the next AM heartbeat to sen= d these containers to NM. If RMAppAttemptImpl accepts the event of AM unreg= istration, justFinishedContainers is not empty, then the container in justF= inishedContainers may not have the opportunity to transfer to finishedConta= inersSentToAM, so that these containers are not sent to NM, and RMNodeImpl = does not release these containers. 2. When RMAppAttemptImpl is in the final state and receives the CONTAINER_F= INISHED event, just add this container to justFinishedContainers and not se= nd it to NM. For the first case, my idea is that when RMAppAttemptImpl handles the amCon= tainer finished event, the container in justFinishedContainers is transferr= ed to finishedContainersSentToAM and sent to NM along with amContainer. I a= m not sure if there is any other impact. For the second case, when RMAppAtt= emptImpl is in the final state and receives the CONTAINER_FINISHED event, t= hese containers are sent directly to NM, but I am worried that this will ge= nerate many events. was (Author: qiuliang988): As I understand it, there are two cases that may cause the completedContain= ers in RMNodeImpl to not be released. 1. When RMAppAttemptImpl receives the CONTAINER_FINISHED(not amContainer) e= vent, it will add this container to justFinishedContainers. When processing= the AM heartbeat, RMAppAttemptImpl first sends the container in finishedCo= ntainersSentToAM to NM, and RMNodeImpl also removes these containers from t= he completedContainers. Then transfer the containers in justFinishedContain= ers to finishedContainersSentToAM and wait for the next AM heartbeat to sen= d these containers to NM. If RMAppAttemptImpl accepts the event of AM unreg= istration, justFinishedContainers is not empty, then the container in justF= inishedContainers may not have the opportunity to transfer to finishedConta= inersSentToAM, so that these containers are not sent to NM, and RMNodeImpl = does not release these containers. 2. When RMAppAttemptImpl is in the final state and receives the CONTAINER_F= INISHED event, just add this container to justFinishedContainers and not se= nd it to NM. For the first case, my idea is that when RMAppAttemptImpl handles the amCon= tainer finished event, the container in justFinishedContainers is transferr= ed to finishedContainersSentToAM and sent to NM along with amContainer. I a= m not sure if there is any other impact. For the second case, when RMAppAtt= emptImpl is in the final state and receives the CONTAINER_FINISHED event, t= hese containers are sent directly to NM, but I am worried that this will ge= nerate many events. > RMNodeImpls occupy too much memory and causes RM GC to take a long time > ----------------------------------------------------------------------- > > Key: YARN-9437 > URL: https://issues.apache.org/jira/browse/YARN-9437 > Project: Hadoop YARN > Issue Type: Bug > Components: resourcemanager > Affects Versions: 2.9.1 > Reporter: qiuliang > Priority: Minor > Attachments: 1.png, 2.png, 3.png, YARN-9437-v1.txt > > > We use hadoop-2.9.1 in our production environment=C2=A0with 1600+ nodes. = 95.63% of RM memory is occupied by RMNodeImpl. Analysis of RM memory found = that each RMNodeImpl has approximately=C2=A014M.=C2=A0The reason is that th= ere is a 130,000+ completedcontainers in each RMNodeImpl that has not been = released. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org