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 8FDC9200B50 for ; Fri, 29 Jul 2016 10:29:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8E68C160AA6; Fri, 29 Jul 2016 08:29: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 D310F160A61 for ; Fri, 29 Jul 2016 10:29:22 +0200 (CEST) Received: (qmail 45757 invoked by uid 500); 29 Jul 2016 08:29:21 -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 45508 invoked by uid 99); 29 Jul 2016 08:29:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jul 2016 08:29:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id DE8382C0D64 for ; Fri, 29 Jul 2016 08:29:20 +0000 (UTC) Date: Fri, 29 Jul 2016 08:29:20 +0000 (UTC) From: "Fenghua Hu (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (HDFS-10690) Optimize insertion/removal of replica in ShortCircuitCache.java MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 29 Jul 2016 08:29:23 -0000 [ https://issues.apache.org/jira/browse/HDFS-10690?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1539= 8939#comment-15398939 ]=20 Fenghua Hu edited comment on HDFS-10690 at 7/29/16 8:28 AM: ------------------------------------------------------------ Performance test result against hadoop-2.6.4: Test configuration: * 1 name node + 1 data node * Datanode: 1 PCIe SSD, 1 SATA HDD, OS page cache: on, read ahead for PCIe = SSD: 0 * Hbase 1.1.2 * Table: key: 10 bytes, value: 1KB, total table size: 320GB, region count: = 30, storage policy: ALL_SSD, blocksize: 8K * YCSB 1.1.2, 4 clients, 16 processes / client, in total 64 processes Test steps: Run GET queries with 64 YCSB processes for 30 minutes, record the QPS for = each process=E3=80=82 Total QPS: w/o patch: 95K w/ patch: 135K The performance gain is (135 - 95) / 95 =3D 42%. was (Author: fenghua_hu): Performance test result against hadoop-2.6.4: Test configuration: * 1 name node + 1 data node * Datanode: 1 PCIe SSD, 1 SATA HDD, OS page cache: on, read ahead for PCIe = SSD: 0 * Hbase 1.1.2 * Table: key: 10 bytes, value: 1KB, total table size: 320GB, region count: = 30, storage policy: ALL_SSD, blocksize: 8K * YCSB 1.1.2, 4 clients, 16 processes / client, in total 64 processes Test steps: Run GET queries with 64 YCSB processes for 30 minutes, record the QPS for = each processes. Total QPS: w/o patch: 95K w/ patch: 135K The performance gain is (135 - 95) / 95 =3D 42%. > Optimize insertion/removal of replica in ShortCircuitCache.java > --------------------------------------------------------------- > > Key: HDFS-10690 > URL: https://issues.apache.org/jira/browse/HDFS-10690 > Project: Hadoop HDFS > Issue Type: Improvement > Components: hdfs-client > Affects Versions: 3.0.0-alpha2 > Reporter: Fenghua Hu > Assignee: Fenghua Hu > Attachments: HDFS-10690.001.patch, HDFS-10690.002.patch > > Original Estimate: 336h > Remaining Estimate: 336h > > Currently in ShortCircuitCache, two TreeMap objects are used to track the= cached replicas. > private final TreeMap evictable =3D new TreeMa= p<>(); > private final TreeMap evictableMmapped =3D new= TreeMap<>(); > TreeMap employs Red-Black tree for sorting. This isn't an issue when usin= g traditional HDD. But when using high-performance SSD/PCIe Flash, the cost= inserting/removing an entry becomes considerable. > To mitigate it, we designed a new list-based for replica tracking. > The list is a double-linked FIFO. FIFO is time-based, thus insertion is a= very low cost operation. On the other hand, list is not lookup-friendly. T= o address this issue, we introduce two references into ShortCircuitReplica = object. > ShortCircuitReplica next =3D null; > ShortCircuitReplica prev =3D null; > In this way, lookup is not needed when removing a replica from the list. = We only need to modify its predecessor's and successor's references in the = lists. > Our tests showed up to 15-50% performance improvement when using PCIe fla= sh as storage media. > The original patch is against 2.6.4, now I am porting to Hadoop trunk, an= d patch will be posted soon. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org