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 545C2200B49 for ; Wed, 20 Jul 2016 07:15:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 53075160A8C; Wed, 20 Jul 2016 05:15:23 +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 C0F82160A76 for ; Wed, 20 Jul 2016 07:15:22 +0200 (CEST) Received: (qmail 56123 invoked by uid 500); 20 Jul 2016 05:15:21 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 56103 invoked by uid 99); 20 Jul 2016 05:15:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2016 05:15:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 82E102C0059 for ; Wed, 20 Jul 2016 05:15:21 +0000 (UTC) Date: Wed, 20 Jul 2016 05:15:21 +0000 (UTC) From: "He Tianyi (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HADOOP-13390) GC pressure of NetworkTopology.isAncestor call can be eliminated MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 20 Jul 2016 05:15:23 -0000 He Tianyi created HADOOP-13390: ---------------------------------- Summary: GC pressure of NetworkTopology.isAncestor call can be eliminated Key: HADOOP-13390 URL: https://issues.apache.org/jira/browse/HADOOP-13390 Project: Hadoop Common Issue Type: Improvement Components: net Affects Versions: 2.7.0, 2.6.0, 2.8.0 Reporter: He Tianyi Priority: Minor {{NetworkTopology.isAncestor}} is called in {{NetworkTopology.getLeaf}}, which is excessively used in block placement policies ({{chooseRandom}} for example). Currently, the implementation calls {{getPath}} twice. And {{getPath}} performs string concatenation on the fly. On a busy NameNode, this introduces more GC pressure and CPU overhead for block allocation. Given that network location and node name does not generally change frequently, we can cache path as a properly of {{Node}} and update accordingly while network location or node name is changing. Also, one of these {{getPath}} calls in {{getLeaf}} can be eliminated because we are expecting identical result in both calls. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: common-issues-help@hadoop.apache.org