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 22766200BFB for ; Wed, 11 Jan 2017 12:10:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 21311160B2E; Wed, 11 Jan 2017 11:10:01 +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 CFD8D160B51 for ; Wed, 11 Jan 2017 12:09:59 +0100 (CET) Received: (qmail 58121 invoked by uid 500); 11 Jan 2017 11:09:59 -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 57791 invoked by uid 99); 11 Jan 2017 11:09:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jan 2017 11:09:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 734552C03E2 for ; Wed, 11 Jan 2017 11:09:58 +0000 (UTC) Date: Wed, 11 Jan 2017 11:09:58 +0000 (UTC) From: "Sunil G (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-6081) LeafQueue#getTotalPendingResourcesConsideringUserLimit should deduct reserved from pending to avoid unnecessary preemption of reserved container MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 11 Jan 2017 11:10:01 -0000 [ https://issues.apache.org/jira/browse/YARN-6081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15818018#comment-15818018 ] Sunil G commented on YARN-6081: ------------------------------- Thanks [~leftnoteasy]. Good catch! We decrement pending resources only if container is allocated (not reserved). So ideally we have to deduct reserved memory from pending resource if any. Ideally makes sense for me. Few comments: 1. {{getTotalPendingResourcesConsideringUserLimit}}, Not part of this patch. Could have a java doc comment there as well. So it ll be make javadoc also more better? 2. {code} Resource pending = app.getAppAttemptResourceUsage().getPending( partition); if (deductReservedFromPending) { pending = Resources.subtract(pending, app.getAppAttemptResourceUsage().getReserved(partition)); } {code} I have one doubt here. {{pending}} holds a reference of pending resource of appAttemptResource usage. Inside {{if(deductReservedFromPending)}} block, that reference is getting updated. Is that intentional? 3. {code} pending = Resources.max(resourceCalculator, lastClusterResource, pending, Resources.none()); {code} A quick doubt. Why are we using lastClusterResource here? 4. {{testPreemptionNotHappenForSingleReservedQueue}}, comment near verify block is confusing. 5. In {{testPendingResourcesConsideringUserLimit}}, could we also try to assert the app's pending and reserved too? > LeafQueue#getTotalPendingResourcesConsideringUserLimit should deduct reserved from pending to avoid unnecessary preemption of reserved container > ------------------------------------------------------------------------------------------------------------------------------------------------ > > Key: YARN-6081 > URL: https://issues.apache.org/jira/browse/YARN-6081 > Project: Hadoop YARN > Issue Type: Bug > Reporter: Wangda Tan > Assignee: Wangda Tan > Attachments: YARN-6081.001.patch > > > While doing YARN-5864 tests, found an issue when a queue's reserved > pending. PreemptionResourceCalculator will preempt reserved container even if there's only one active queue in the cluster. > To fix the problem, we need to deduct reserved from pending when getting total-pending resource for LeafQueue. -- 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