From yarn-issues-return-168700-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Mon Jun 10 05:29:02 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 952BC18067E for ; Mon, 10 Jun 2019 07:29:02 +0200 (CEST) Received: (qmail 27851 invoked by uid 500); 10 Jun 2019 05:29:01 -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 27839 invoked by uid 99); 10 Jun 2019 05:29:01 -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; Mon, 10 Jun 2019 05:29:01 +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 8EF7DE2D45 for ; Mon, 10 Jun 2019 05:29:00 +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 32E3D24637 for ; Mon, 10 Jun 2019 05:29:00 +0000 (UTC) Date: Mon, 10 Jun 2019 05:29:00 +0000 (UTC) From: "Tao Yang (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-9598) Make reservation work well when multi-node enabled 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-9598?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16859= 709#comment-16859709 ]=20 Tao Yang commented on YARN-9598: -------------------------------- Thanks [~jutia] for the {quote} for this, if re-reservation is disabled, the shouldAllocOrReserveNewContain= er may return false in most cases, and thus even scheduler has a change to = look up other candidates, it may not assign containers. {quote} IIUIC, shouldAllocOrReserveNewContainer variable is used for reserving more= resource than required, which I think it's not only unnecessary (we can se= e and choose available resources from all nodes) but also harmful in multi-= nodes scenarios, this logic can make a low-priority app get much more resou= rces than needs which won't be released util all the needs satisfied, it's = inefficient for the cluster utilization and can block requirements from hig= h-priority apps. On another hand, disable re-reservation can only make the = scheduler skip reserving the same container repeatedly and try to allocate = on other nodes, it won't affect normal scheduling for this app and later ap= ps. Thoughts? {quote} I'm wondering why we just handle this case like sing-node, and change th lo= gic in CapacityScheduler#allocateContainersOnMultiNodes like below {quote} [~cheersyang] and I have discussed about moving allocateFromReservedContain= er ahead to avoid trying to allocate from reserved containers many times in= once scheduling for YARN-9432, and chose not to do that after considering = that won't be a tiny change and should affect current scheduling process, j= ust fix the problem without changing more, same as this issue. > Make reservation work well when multi-node enabled > -------------------------------------------------- > > Key: YARN-9598 > URL: https://issues.apache.org/jira/browse/YARN-9598 > Project: Hadoop YARN > Issue Type: Bug > Components: capacityscheduler > Reporter: Tao Yang > Assignee: Tao Yang > Priority: Major > Attachments: YARN-9598.001.patch, image-2019-06-10-11-37-43-283.p= ng, image-2019-06-10-11-37-44-975.png > > > This issue is to=C2=A0solve problems=C2=A0about reservation when multi-no= de enabled: > # As discussed in YARN-9576, re-reservation proposal may be always gener= ated on the same node and=C2=A0break=C2=A0the scheduling for this app and l= ater apps. I think re-reservation in unnecessary and we can replace it with= LOCALITY_SKIPPED to=C2=A0let scheduler have a chance to look up follow can= didates for this app=C2=A0when multi-node enabled. > # Scheduler iterates all nodes and try to allocate for reserved containe= r in LeafQueue#allocateFromReservedContainer. Here there are two problems: > ** The=C2=A0node of reserved container should be taken=C2=A0as candidate= s instead of all nodes when calling FiCaSchedulerApp#assignContainers, othe= rwise later scheduler may generate a reservation-fulfilled proposal on anot= her node, which will always be rejected=C2=A0in FiCaScheduler#commonCheckCo= ntainerAllocation. > ** Assignment returned by=C2=A0FiCaSchedulerApp#assignContainers=C2=A0co= uld never be null even if=C2=A0it's just skipped,=C2=A0it will break the no= rmal scheduling process for this leaf queue because of the if clause in Lea= fQueue#assignContainers: "if (null !=3D assignment) \{ return assignment;}" > # Nodes which have been reserved should be skipped when iterating=C2=A0c= andidates in RegularContainerAllocator#allocate, otherwise scheduler=C2=A0m= ay generate allocation or reservation proposal on these node which will alw= ays be rejected in FiCaScheduler#commonCheckContainerAllocation. -- 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