Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 266D4200BAF for ; Mon, 31 Oct 2016 19:00:02 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 25134160AED; Mon, 31 Oct 2016 18:00:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6C977160B09 for ; Mon, 31 Oct 2016 19:00:01 +0100 (CET) Received: (qmail 77355 invoked by uid 500); 31 Oct 2016 18:00:00 -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 77202 invoked by uid 99); 31 Oct 2016 17:59:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Oct 2016 17:59:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id AC9AC2C2A6B for ; Mon, 31 Oct 2016 17:59:59 +0000 (UTC) Date: Mon, 31 Oct 2016 17:59:59 +0000 (UTC) From: "Jason Lowe (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-65) Reduce RM app memory footprint once app has completed MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 31 Oct 2016 18:00:02 -0000 [ https://issues.apache.org/jira/browse/YARN-65?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15622866#comment-15622866 ] Jason Lowe commented on YARN-65: -------------------------------- I believe the request is still valid. This isn't so much about adjusting the configurable number as it is reducing the memory waste per application. Even with fewer applications retained there are opportunities to reduce the resourcemanager's memory requirements. RMAppManager may only be tracking ApplicationId objects directly in completedApps, but the RMContext is tracking the full RMAppImpl objects that are looked up by those IDs (see RMContext#getRMApps and RMAppManager#checkAppNumCompletedLimit). It doesn't make sense for the RM to track only the ApplicationID for completed applications since that alone is not enough to build an application report should someone come along and query it. So the RM needs to track enough information to fill out a report for completed applications, but the submissionContext is a significant chunk of memory (it can be many megabytes in some cases) that can be freed once the application has finished. There are a couple of items from the submission context that are referenced when filling out an app report (e.g.: priority, whether the AM was unmanaged), but those can be copied out, allowing the submission context to be released once the app finishes. At one extreme we could take a similar approach to the MR job history server, using a cheaper representation for tracking completed applications, i.e.: when an application completes, replace the RMAppImpl object with something like a RMCompletedAppImpl that in turn has references to RMCompletedAppAttemptImpl rather than RMAppAttemptImpl. Then we can dump the unnecessary concurrent hash maps necessary when the job is active and all the one-off tracking fields that only make sense when the app is alive. Of course there are diminishing returns there and an increased maintenance burden, so it may not be worth it. However releasing the submissionContext probably gets us most of the memory savings with what should be a relatively straightforward change. > Reduce RM app memory footprint once app has completed > ----------------------------------------------------- > > Key: YARN-65 > URL: https://issues.apache.org/jira/browse/YARN-65 > Project: Hadoop YARN > Issue Type: Improvement > Components: resourcemanager > Affects Versions: 0.23.3 > Reporter: Jason Lowe > > The ResourceManager holds onto a configurable number of completed applications (yarn.resource.max-completed-applications, defaults to 10000), and the memory footprint of these completed applications can be significant. For example, the {{submissionContext}} in RMAppImpl contains references to protocolbuffer objects and other items that probably aren't necessary to keep around once the application has completed. We could significantly reduce the memory footprint of the RM by releasing objects that are no longer necessary once an application completes. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org