Return-Path: X-Original-To: apmail-hbase-dev-archive@www.apache.org Delivered-To: apmail-hbase-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E634F1137F for ; Tue, 29 Jul 2014 17:10:03 +0000 (UTC) Received: (qmail 62143 invoked by uid 500); 29 Jul 2014 17:10:03 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 62059 invoked by uid 500); 29 Jul 2014 17:10:03 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 62046 invoked by uid 99); 29 Jul 2014 17:10:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2014 17:10:03 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of todd@cloudera.com designates 209.85.215.50 as permitted sender) Received: from [209.85.215.50] (HELO mail-la0-f50.google.com) (209.85.215.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jul 2014 17:09:58 +0000 Received: by mail-la0-f50.google.com with SMTP id gf5so6683259lab.23 for ; Tue, 29 Jul 2014 10:09:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; bh=TfuQp+Y8eOQ9AzhxuW6bnLuLCB0B10490XyNfZKqyHo=; b=CioV3mesIy1A7x3rvrQIFKe4jICU3dck7exVLc/L9j3p1gXKOfZc9oYGtJ7xoqqDH4 J81ev+VOdqnh6TdWhIh/KYVmwTOWlUCwl1v3HM+ncPCEF3c/qewLH48wvlByOIr9sERR 4tTh1MFQLZEyHpw3AC10QHp6ZR3r1dcv7yNA5ujknNDltNNJ2zN7h5XwVI3MxZrIw4hR CHpOxMNLSDlSYvR8Aofb6uyKeBb41TqfteItdM2FpfQ1/zG394TMfNePKWNGBsldIik7 Q0nvIq3KHpr4ri9eItmXpNrF2Md5F24FDEt2pMNl9VIcbmCIdIe2qGEqF9/5boYyKglQ QBOw== X-Gm-Message-State: ALoCoQlsJetBiqbi0a6K4W2i+Giu1uEdZqPldcmWsBYFRjDHeRnucR1eAJ4nY/SUEiSfE8Wer/7K X-Received: by 10.112.63.168 with SMTP id h8mr3476736lbs.69.1406653775298; Tue, 29 Jul 2014 10:09:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.217.73 with HTTP; Tue, 29 Jul 2014 10:09:15 -0700 (PDT) In-Reply-To: References: From: Todd Lipcon Date: Tue, 29 Jul 2014 10:09:15 -0700 Message-ID: Subject: Re: About "dfs.client-write-packet-size" setting To: dev Content-Type: multipart/alternative; boundary=001a11c3edf0995b9504ff581ac1 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3edf0995b9504ff581ac1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable What about a patch to HDFS to reuse these buffers in a pool? On Tue, Jul 29, 2014 at 10:08 AM, Stack wrote: > You the man @liang xie. Let me try your suggestion here on my little tes= t > bench. Lets get the below into refguide also.... > St.Ack > > > On Mon, Jul 28, 2014 at 8:03 PM, =E8=B0=A2=E8=89=AF = wrote: > > > The default dfs.client-write-packet-size value is 64k, at least it's in > my > > Hadoop2 env. > > I did a benchmark about i via ycsb loading 2 million records(3*200 > bytes): > > 1) dfs.client-write-packet-size=3D64k ygc count:399, ygct:4.208s > > 2) dfs.client-write-packet-size=3D8k ygc count:163, ygct:2.644s > > you see, it's about 40% benefit on gct:) > > It's because: in DFSOutputStream.Packet class, each "Create a new packe= t" > > operation, > > will call "buf =3D new byte[PacketHeader.PKT_MAX_HEADER_LEN + pktSize];= ", > > here "pktSize" comes from dfs.client-write-packet-size setting, and in > > HBase write scenario, > > we sync WAL asap, so all the new packets are very small > > (in my ycsb testing, most of them were only hundreds of bytes, or a few > > kilo bytes), > > rarely reached to 64k, so always allocating 64k array is just a waste. > > It would be better that if we add it to refguide note:) > > > > ps; 8k just a test setting, we should set it according the real kv size > > pattern. > > > > Thanks, > > > --=20 Todd Lipcon Software Engineer, Cloudera --001a11c3edf0995b9504ff581ac1--