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 0EB664789 for ; Wed, 29 Jun 2011 14:39:55 +0000 (UTC) Received: (qmail 18829 invoked by uid 500); 29 Jun 2011 14:39:54 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 18710 invoked by uid 500); 29 Jun 2011 14:39:53 -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 18702 invoked by uid 99); 29 Jun 2011 14:39:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 14:39:53 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of koven2049@gmail.com designates 209.85.218.41 as permitted sender) Received: from [209.85.218.41] (HELO mail-yi0-f41.google.com) (209.85.218.41) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 14:39:48 +0000 Received: by yia13 with SMTP id 13so649550yia.14 for ; Wed, 29 Jun 2011 07:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=lOViWiXBWBbqWhotO/gHr/m3S7pzz7Y1zbb9lhk/5Xg=; b=oomvPFrB6+0DKSZ0r+QtQMy9SeE2McSwFHKPPjWIiwd2mp6vq5E7lpQrouE3fxihNw nIA9POYhN/8oj2qrneCqv7kVd12mTJdqC467Ya0XrRhBZ3RBIsKxEMjk4rn5tVo5Ne+x eNTW/UvRqajHGmjVE4+l1WSMC0919P2txgc9o= MIME-Version: 1.0 Received: by 10.150.50.3 with SMTP id x3mr706788ybx.350.1309358367488; Wed, 29 Jun 2011 07:39:27 -0700 (PDT) Received: by 10.151.49.17 with HTTP; Wed, 29 Jun 2011 07:39:27 -0700 (PDT) In-Reply-To: References: Date: Wed, 29 Jun 2011 22:39:27 +0800 Message-ID: Subject: Re: performance: HLog flush to disk each thread, can we decrease IO calls? From: Mingjian Deng To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=000e0cd6ae1e60ba0104a6dac07b --000e0cd6ae1e60ba0104a6dac07b Content-Type: text/plain; charset=ISO-8859-1 Yes, it can only increase tps and less helpful for latency. I modified my code and generated from trunk. https://issues.apache.org/jira/browse/HBASE-4044 2011/6/29 Dhruba Borthakur > We have implemented this idea, and it definitely increases HLog performance > by quite a large number. The one drawabck is that writes to HLog (from HDFS > perspective) become more "batchy", and writes to a HDFS file consume quite > a > bit of CPU. So I have observed that this change increase overall system > throughput, but suffer slightly on individual transaction latency. > > -dhruba > > On Wed, Jun 29, 2011 at 6:08 AM, Joey Echeverria > wrote: > > > Hey Mingjian, > > > > This sounds like a good idea Your patch didn't make it through. Would > you > > mind either filing a JIRA and uploading your patch there or at least > posting > > it to something like pastebin so we can take a look. > > > > -Joey > > > > > > > > On Jun 29, 2011, at 3:27, Mingjian Deng wrote: > > > > > Hi: > > > We found that the hlog sync to disk each time. When one thread exec > > "doWrite(info, logKey, edit);", the others wait for "updateLock" in > > HLog.java. > > > Why not the others add their edits into a list and wait. When > sync's > > time, the whole list sync to disk once. I think it will decrease the IO > > calls. > > > > > > So Maybe we will make two lists for edits. Each thread write to the > > "waledits" and wait for "updateLock". Each thread can copy the "waledits" > to > > "flushedits" and flush the "flushedits" to > > > disk once it gets "updateLock". > > > > > > In my test, it can increase the write speed of 40%. > > > > > > Just see the HLog.patch. > > > > > > > > > -- > Connect to me at http://www.facebook.com/dhruba > --000e0cd6ae1e60ba0104a6dac07b--