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 43BF3200C4C for ; Tue, 4 Apr 2017 22:47:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 422D5160B90; Tue, 4 Apr 2017 20:47:46 +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 8A833160B77 for ; Tue, 4 Apr 2017 22:47:45 +0200 (CEST) Received: (qmail 8185 invoked by uid 500); 4 Apr 2017 20:47:44 -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 8174 invoked by uid 99); 4 Apr 2017 20:47:44 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Apr 2017 20:47:44 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2CD7E1A045B for ; Tue, 4 Apr 2017 20:47:44 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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 (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ytZBhxkDeI_M for ; Tue, 4 Apr 2017 20:47:43 +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 DBA315FDFF for ; Tue, 4 Apr 2017 20:47:42 +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 44712E0A31 for ; Tue, 4 Apr 2017 20:47:42 +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 A39992401C for ; Tue, 4 Apr 2017 20:47:41 +0000 (UTC) Date: Tue, 4 Apr 2017 20:47:41 +0000 (UTC) From: "Karthik Kambatla (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (YARN-6245) Add FinalResource object to reduce overhead of Resource class instancing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 04 Apr 2017 20:47:46 -0000 [ https://issues.apache.org/jira/browse/YARN-6245?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15955780#comment-15955780 ] Karthik Kambatla edited comment on YARN-6245 at 4/4/17 8:47 PM: ---------------------------------------------------------------- bq. It works very well so I think we may not need a huge patch to remove ResourcePBImpl from scheduler entirely. IMO, the scheduler is becoming increasingly complex. Using both the light and proto versions in the scheduler adds to this complexity. I would really like for us to avoid that. bq. So my question should I submit both changes in one patch? It might be nice to have one patch focus on replacing proto-based Resource in the scheduler with LightResource. This would include updating the calculators to use and return LightResource. Another patch could optimize for the number of LightResource objects created. Does that sound reasonable, [~roniburd]? And, the first patch could be here. YARN-6418 can be closed as a duplicate or re-purposed for the other patch. We might also want to update the title and description here to say LightResource instead of FinalResource. was (Author: kasha): bq. It works very well so I think we may not need a huge patch to remove ResourcePBImpl from scheduler entirely. IMO, the scheduler is becoming increasingly complex. Using both the light and proto versions in the scheduler adds to this complexity. I would really like for us to avoid that. bq. So my question should I submit both changes in one patch? It might be nice to have one patch focus on replacing proto-based Resource in the scheduler with LightResource. This would include updating the calculators to use and return LightResource. Another patch could optimize for the number of LightResource objects created. Does that sound reasonable, [~roniburd]? > Add FinalResource object to reduce overhead of Resource class instancing > ------------------------------------------------------------------------ > > Key: YARN-6245 > URL: https://issues.apache.org/jira/browse/YARN-6245 > Project: Hadoop YARN > Issue Type: Sub-task > Reporter: Wangda Tan > Attachments: observable-resource.patch, YARN-6245.preliminary-staled.1.patch > > > There're lots of Resource object creation in YARN Scheduler, since Resource object is backed by protobuf, creation of such objects is expensive and becomes bottleneck. > To address the problem, we can introduce a FinalResource (Is it better to call it ImmutableResource?) object, which is not backed by PBImpl. We can use this object in frequent invoke paths in the scheduler. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: yarn-issues-help@hadoop.apache.org