From hdfs-issues-return-270026-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Mon Jul 1 07:29:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id C8660180670 for ; Mon, 1 Jul 2019 09:29:01 +0200 (CEST) Received: (qmail 45285 invoked by uid 500); 1 Jul 2019 07:29:01 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 45273 invoked by uid 99); 1 Jul 2019 07:29:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jul 2019 07:29:01 +0000 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 62E88E0DDB for ; Mon, 1 Jul 2019 07:29:00 +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 2832A25FFA for ; Mon, 1 Jul 2019 07:29:00 +0000 (UTC) Date: Mon, 1 Jul 2019 07:29:00 +0000 (UTC) From: "Lisheng Sun (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-13693) Remove unnecessary search in INodeDirectory.addChild during image loading MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-13693?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1687= 5987#comment-16875987 ]=20 Lisheng Sun commented on HDFS-13693: ------------------------------------ Thank [~jojochuang] for your comments. =C2=A0 {quote}I am not a snapshot expert, but I'd be interested to see if INodeRef= erence can be optimized the same way. If you don't use snapshot and don't k= now it off the top of your head, I can find a snapshotted fsimage and exper= iment it. {quote} =C2=A0Sorry, XiaoMi HDFS don't use=C2=A0snapshot and=C2=A0don't know it off= the top of your head,=C2=A0unfortunately=C2=A0=C2=A0I can't=C2=A0find a sn= apshotted fsimage and experiment it. =C2=A0 And I have added javadoc for the addChildAtLoading method and update= d the patch.=C2=A0 Could you have time to review this patch? Thank you. > Remove unnecessary search in INodeDirectory.addChild during image loading > ------------------------------------------------------------------------- > > Key: HDFS-13693 > URL: https://issues.apache.org/jira/browse/HDFS-13693 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Reporter: zhouyingchao > Assignee: Lisheng Sun > Priority: Major > Attachments: HDFS-13693-001.patch > > > In=C2=A0FSImageFormatPBINode.loadINodeDirectorySection, all child INodes = are added to their parent INode's map one by one. The adding procedure will= search a position in the parent's map and then insert the child to the pos= ition. However, during image loading, the search is unnecessary since=C2=A0= the insert position should always be at the end of the map given the sequen= ce they are serialized on disk. > Test this patch against=C2=A0a fsimage of a 70PB=C2=A0 cluster (200millio= n files and 300million blocks), the image loading time be reduced from 1210= seconds to 1138 seconds.So it can reduce up to about 10% of time. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org