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 CC0F8200CB3 for ; Mon, 26 Jun 2017 23:54:16 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CB147160BDE; Mon, 26 Jun 2017 21:54:16 +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 092EC160BDA for ; Mon, 26 Jun 2017 23:54:15 +0200 (CEST) Received: (qmail 37502 invoked by uid 500); 26 Jun 2017 21:54:15 -0000 Mailing-List: contact mapreduce-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list mapreduce-issues@hadoop.apache.org Received: (qmail 37489 invoked by uid 99); 26 Jun 2017 21:54:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2017 21:54:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id B1336C08B5 for ; Mon, 26 Jun 2017 21:54:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id tUcNS4cHQdzF for ; Mon, 26 Jun 2017 21:54:13 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id B63F760E2C for ; Mon, 26 Jun 2017 21:54:04 +0000 (UTC) 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 0ED30E0DE3 for ; Mon, 26 Jun 2017 21:54:03 +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 A213E2415E for ; Mon, 26 Jun 2017 21:54:00 +0000 (UTC) Date: Mon, 26 Jun 2017 21:54:00 +0000 (UTC) From: "Vrushali C (JIRA)" To: mapreduce-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (MAPREDUCE-6647) MR usage counters use the resources requested instead of the resources allocated MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 26 Jun 2017 21:54:16 -0000 [ https://issues.apache.org/jira/browse/MAPREDUCE-6647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16063865#comment-16063865 ] Vrushali C commented on MAPREDUCE-6647: --------------------------------------- Hi [~haibo.chen] [~rkanter] Although it's technically a correct use case that we need a counter that reports what the actual usage is, this update will break the meaning for downstream apps which have been using these counter to track their usage. They could now suddenly see a "drop" in their usage of memory or vcores or both. Also, how do you envision tracking the resource allocation for these jobs? Is there another counter that tells us how much memory was reserved for this job on the cluster (which is what mbmillis meant before this patch)? Similarly for vcore-millis? Because that memory was not available for scheduling other containers. > MR usage counters use the resources requested instead of the resources allocated > -------------------------------------------------------------------------------- > > Key: MAPREDUCE-6647 > URL: https://issues.apache.org/jira/browse/MAPREDUCE-6647 > Project: Hadoop Map/Reduce > Issue Type: Bug > Reporter: Haibo Chen > Assignee: Haibo Chen > Fix For: 2.9.0, 3.0.0-alpha1 > > Attachments: mapreduce6647.001.patch, mapreduce6647.002.patch, mapreduce6647.003.patch, mapreduce6647.004.patch > > > As can be seen in the following snippet, the MR counters for usage use the resources requested instead of the resources allocated. The scheduler increment-allocation-mb configs could lead to these values not being the same. We could change the counters to use the allocated resources in order to account for this. > {code} > private static void updateMillisCounters(JobCounterUpdateEvent jce, > TaskAttemptImpl taskAttempt) { > /***omitted**/ > long duration = (taskAttempt.getFinishTime() - taskAttempt.getLaunchTime()); > int mbRequired = > taskAttempt.getMemoryRequired(taskAttempt.conf, taskType); > int vcoresRequired = taskAttempt.getCpuRequired(taskAttempt.conf, taskType); > int minSlotMemSize = taskAttempt.conf.getInt( > YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, > YarnConfiguration.DEFAULT_RM_SCHEDULER_MINIMUM_ALLOCATION_MB); > int simSlotsRequired = > minSlotMemSize == 0 ? 0 : (int) Math.ceil((float) mbRequired > / minSlotMemSize); > if (taskType == TaskType.MAP) { > jce.addCounterUpdate(JobCounter.SLOTS_MILLIS_MAPS, simSlotsRequired * duration); > jce.addCounterUpdate(JobCounter.MB_MILLIS_MAPS, duration * mbRequired); > jce.addCounterUpdate(JobCounter.VCORES_MILLIS_MAPS, duration * vcoresRequired); > jce.addCounterUpdate(JobCounter.MILLIS_MAPS, duration); > } else { > jce.addCounterUpdate(JobCounter.SLOTS_MILLIS_REDUCES, simSlotsRequired * duration); > jce.addCounterUpdate(JobCounter.MB_MILLIS_REDUCES, duration * mbRequired); > jce.addCounterUpdate(JobCounter.VCORES_MILLIS_REDUCES, duration * vcoresRequired); > jce.addCounterUpdate(JobCounter.MILLIS_REDUCES, duration); > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: mapreduce-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: mapreduce-issues-help@hadoop.apache.org