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 D1C14200CD6 for ; Mon, 31 Jul 2017 22:12:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D06E8165DA9; Mon, 31 Jul 2017 20:12:06 +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 221F6165DA7 for ; Mon, 31 Jul 2017 22:12:05 +0200 (CEST) Received: (qmail 82695 invoked by uid 500); 31 Jul 2017 20:12:05 -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 82684 invoked by uid 99); 31 Jul 2017 20:12:05 -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, 31 Jul 2017 20:12:05 +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 B9301C028C for ; Mon, 31 Jul 2017 20:12:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[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 0bt6O8QCCkdk for ; Mon, 31 Jul 2017 20:12:03 +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 EBC885F523 for ; Mon, 31 Jul 2017 20:12:02 +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 96325E0DA6 for ; Mon, 31 Jul 2017 20:12: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 5F57224652 for ; Mon, 31 Jul 2017 20:12:00 +0000 (UTC) Date: Mon, 31 Jul 2017 20:12:00 +0000 (UTC) From: "Sunil G (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (YARN-6788) Improve performance of resource profile branch MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 31 Jul 2017 20:12:07 -0000 [ https://issues.apache.org/jira/browse/YARN-6788?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Sunil G updated YARN-6788: -------------------------- Attachment: YARN-6788-YARN-3926.018.patch Thanks [~templedf] for comments. Updating new patch fixing same. bq.=C2=A0What I was trying to say is that=C2=A0getResourceTypesArray()=C2= =A0starts with a call to=C2=A0getResourceTypes()=C2=A0to make sure the arra= y is initialized before returning it. Why doesn't=C2=A0getResourceNamesArra= y()=C2=A0also do that? In {{DominantResourceCalculator()}}, we already invoke {{getResourceTypes}}= . So i think its fine. bq.Sorry to be slow, but I still don't see it. What I mean is that knownRes= ourceNamesArray is initialized like this Yes. You are correct, bq.The risk is that if thread A is just exiting the synchronized block, and= thread B is hitting the first check, thread B may see that lock is initial= ized, but knownResourceNamesArray may not have been flushed yet. I think i understood the point. But as mentioned in above statement, thread= A is just exiting the synchronized block, then resourceTypesArray/NamesArr= ay must be initialized since its inside synchronized block. Yes, ideally we= can optimize here and change to a volatile boolean + array object. If its = fine, i would like to take that in another ticket so that i can run some th= read analyzer tools as well. Thoughts? > Improve performance of resource profile branch > ---------------------------------------------- > > Key: YARN-6788 > URL: https://issues.apache.org/jira/browse/YARN-6788 > Project: Hadoop YARN > Issue Type: Sub-task > Components: nodemanager, resourcemanager > Reporter: Sunil G > Assignee: Sunil G > Priority: Blocker > Attachments: YARN-6788-YARN-3926.001.patch, YARN-6788-YARN-3926.0= 02.patch, YARN-6788-YARN-3926.003.patch, YARN-6788-YARN-3926.004.patch, YAR= N-6788-YARN-3926.005.patch, YARN-6788-YARN-3926.006.patch, YARN-6788-YARN-3= 926.007.patch, YARN-6788-YARN-3926.008.patch, YARN-6788-YARN-3926.009.patch= , YARN-6788-YARN-3926.010.patch, YARN-6788-YARN-3926.011.patch, YARN-6788-Y= ARN-3926.012.patch, YARN-6788-YARN-3926.013.patch, YARN-6788-YARN-3926.014.= patch, YARN-6788-YARN-3926.015.patch, YARN-6788-YARN-3926.016.patch, YARN-6= 788-YARN-3926.017.patch, YARN-6788-YARN-3926.018.patch > > > Currently we could see a 15% performance delta with this branch.=20 > Few performance improvements to improve the same. > Also this patch will handle [comments|https://issues.apache.org/jira/brow= se/YARN-6761?focusedCommentId=3D16075418&page=3Dcom.atlassian.jira.plugin.s= ystem.issuetabpanels:comment-tabpanel#comment-16075418] from [~leftnoteasy]= . -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org