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 44DAF4A05 for ; Wed, 29 Jun 2011 13:08:42 +0000 (UTC) Received: (qmail 81569 invoked by uid 500); 29 Jun 2011 13:08:41 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 81416 invoked by uid 500); 29 Jun 2011 13:08:40 -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 81406 invoked by uid 99); 29 Jun 2011 13:08:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 13:08:40 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,MIME_QP_LONG_LINE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of joey@cloudera.com designates 209.85.214.169 as permitted sender) Received: from [209.85.214.169] (HELO mail-iw0-f169.google.com) (209.85.214.169) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jun 2011 13:08:31 +0000 Received: by iwn8 with SMTP id 8so1397471iwn.14 for ; Wed, 29 Jun 2011 06:08:10 -0700 (PDT) Received: by 10.42.97.70 with SMTP id m6mr802651icn.45.1309352889759; Wed, 29 Jun 2011 06:08:09 -0700 (PDT) Received: from [192.168.2.183] (173-11-108-233-SFBA.hfc.comcastbusiness.net [173.11.108.233]) by mx.google.com with ESMTPS id d6sm1076550icx.1.2011.06.29.06.08.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 29 Jun 2011 06:08:08 -0700 (PDT) Subject: Re: performance: HLog flush to disk each thread, can we decrease IO calls? References: From: Joey Echeverria Content-Type: multipart/alternative; boundary=Apple-Mail-1-333207594 X-Mailer: iPad Mail (8G4) In-Reply-To: Message-Id: Date: Wed, 29 Jun 2011 06:08:06 -0700 To: "dev@hbase.apache.org" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (iPad Mail 8G4) X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-1-333207594 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hey Mingjian, This sounds like a good idea Your patch didn't make it through. Would you m= ind either filing a JIRA and uploading your patch there or at least posting i= t 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 "d= oWrite(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 t= ime, the whole list sync to disk once. I think it will decrease the IO calls= .=20 >=20 > So Maybe we will make two lists for edits. Each thread write to the "w= aledits" and wait for "updateLock". Each thread can copy the "waledits" to "= flushedits" and flush the "flushedits" to=20 > disk once it gets "updateLock". >=20 > In my test, it can increase the write speed of 40%. >=20 > Just see the HLog.patch. > =20 --Apple-Mail-1-333207594--