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 A23F7200D29 for ; Thu, 26 Oct 2017 22:42:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A0CA71609E8; Thu, 26 Oct 2017 20:42: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 E6D8B1609E5 for ; Thu, 26 Oct 2017 22:42:05 +0200 (CEST) Received: (qmail 35726 invoked by uid 500); 26 Oct 2017 20:42: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 35714 invoked by uid 99); 26 Oct 2017 20:42:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Oct 2017 20:42:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 34E0D1808A3 for ; Thu, 26 Oct 2017 20:42:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id LGHJonwSQi8P for ; Thu, 26 Oct 2017 20:42:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0D3285FD41 for ; Thu, 26 Oct 2017 20:42:03 +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 98A29E2585 for ; Thu, 26 Oct 2017 20:42: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 8D97E21308 for ; Thu, 26 Oct 2017 20:42:00 +0000 (UTC) Date: Thu, 26 Oct 2017 20:42:00 +0000 (UTC) From: "Misha Dmitriev (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-7320) Duplicate LiteralByteStrings in SystemCredentialsForAppsProto.credentialsForApp_ MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 26 Oct 2017 20:42:06 -0000 [ https://issues.apache.org/jira/browse/YARN-7320?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D16221= 206#comment-16221206 ]=20 Misha Dmitriev commented on YARN-7320: -------------------------------------- [~rkanter] [~wangda] looks like in ~24 hrs Jenkins still hasn't processed m= y patch. Could you please check what's going on? > Duplicate LiteralByteStrings in SystemCredentialsForAppsProto.credentials= ForApp_ > -------------------------------------------------------------------------= ------- > > Key: YARN-7320 > URL: https://issues.apache.org/jira/browse/YARN-7320 > Project: Hadoop YARN > Issue Type: Improvement > Reporter: Misha Dmitriev > Assignee: Misha Dmitriev > Fix For: 3.0.0 > > Attachments: YARN-7320.01.addendum.patch, YARN-7320.01.patch, YAR= N-7320.02.patch > > > Using jxray (www.jxray.com) I've analyzed several heap dumps from YARN Re= source Manager running in a big cluster. The tool uncovered several sources= of memory waste. One problem, which results in wasting more than a quarter= of all memory, is a large number of duplicate {{LiteralByteString}} object= s coming from the following reference chain: > {code} > 1,011,810K (26.9%): byte[]: 5416705 / 100% dup arrays (22108 unique) > =E2=86=96com.google.protobuf.LiteralByteString.bytes > =E2=86=96org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos$.cred= entialsForApp_ > =E2=86=96{j.u.ArrayList} > =E2=86=96j.u.Collections$UnmodifiableRandomAccessList.c > =E2=86=96org.apache.hadoop.yarn.proto.YarnServerCommonServiceProtos$NodeH= eartbeatResponseProto.systemCredentialsForApps_ > =E2=86=96org.apache.hadoop.yarn.server.api.protocolrecords.impl.pb.NodeHe= artbeatResponsePBImpl.proto > =E2=86=96org.apache.hadoop.yarn.server.resourcemanager.rmnode.RMNodeImpl.= latestNodeHeartBeatResponse > =E2=86=96org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FSS= chedulerNode.rmNode > ... > {code} > That is, collectively reference chains that look as above hold in memory = 5.4 million {{LiteralByteString}} objects, but only ~22 thousand of these o= bjects are unique. Deduplicating these objects, e.g. using a Google Object = Interner instance, would save ~1GB of memory. > It looks like the main place where the above {{LiteralByteString}}s are c= reated and attached to the {{SystemCredentialsForAppsProto}} objects is in = {{NodeHeartbeatResponsePBImpl.java}}, method {{addSystemCredentialsToProto(= )}}. Probably adding a call to an interner there will fix the problem. wi= =20 -- 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