Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B813C1062C for ; Thu, 20 Nov 2014 17:32:50 +0000 (UTC) Received: (qmail 17249 invoked by uid 500); 20 Nov 2014 17:32:48 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 17177 invoked by uid 500); 20 Nov 2014 17:32:48 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 17159 invoked by uid 99); 20 Nov 2014 17:32:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2014 17:32:48 +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 (nike.apache.org: domain of yuzhihong@gmail.com designates 209.85.213.53 as permitted sender) Received: from [209.85.213.53] (HELO mail-yh0-f53.google.com) (209.85.213.53) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2014 17:32:22 +0000 Received: by mail-yh0-f53.google.com with SMTP id i57so1536371yha.26 for ; Thu, 20 Nov 2014 09:32:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=f1gvrzwR2Jij7UockD5yNyKGzsSmc84raWaW1BZWHnI=; b=IN6a3/eeIMYq7Gy5Vz/m5TEe/KG/T//Zj88rIwFKTiJzxzAx7o87UVvxqke9iTTg1S KM1tIJJ3kkYXqpfReNaAULQlH/ArrcDb+SEoFcvJIWh8ME48FBWHZ0FZPHxJEDKpLCx5 x48GrM6XZK16s8k8o7gsAhGKjxsRAlFDXeHhUXdJMbFnM7U8MwPK5YSNYzbHLVotU30i z5hvwzSdEqgdcHMAG4qPeCc4OIQad+JUgdPIs4euxxt4l9UP3mtHoUTxyHaO3+AN5oYP q1JCU9mHpRiqesKPd96Gkug5tNLqGpfRuOqGFkdiYfELkTVg+PDfnnti2SwJB1AgUzyZ K5lQ== MIME-Version: 1.0 X-Received: by 10.170.139.86 with SMTP id g83mr1882724ykc.96.1416504741451; Thu, 20 Nov 2014 09:32:21 -0800 (PST) Received: by 10.170.180.7 with HTTP; Thu, 20 Nov 2014 09:32:21 -0800 (PST) In-Reply-To: <8645A306C824894AA8EE0B9C91D62AE074799669@G9W0747.americas.hpqcorp.net> References: <8645A306C824894AA8EE0B9C91D62AE074799669@G9W0747.americas.hpqcorp.net> Date: Thu, 20 Nov 2014 09:32:21 -0800 Message-ID: Subject: Re: how to explain read/write performance change after modifying the hfile.block.cache.size? From: Ted Yu To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=001a113994feefde4105084db506 X-Virus-Checked: Checked by ClamAV on apache.org --001a113994feefde4105084db506 Content-Type: text/plain; charset=UTF-8 When block cache size increases from 0 to 0.4, the amount of heap given to memstore decreases. This would slow down the writes. Please see: http://hbase.apache.org/book.html#store.memstore For your second question, see this thread: http://search-hadoop.com/m/DHED4TEvBy1/lars+hbase+hflush&subj=Re+Clarifications+on+HBase+Durability Cheers On Thu, Nov 20, 2014 at 8:05 AM, Liu, Ming (HPIT-GADSC) wrote: > Hello, all, > > I am playing with YCSB to test HBase performance. I am using HBase 0.98.5. > I tried to adjust the hfile.block.cache.size to see the difference, when I > set hfile.block.cache.size to 0, read performance is very bad, but write > performance is very very very good....; when I set hfile.block.cache.size > to 0.4, read is better, but write performance drop dramatically. I disable > the client side writebuffer already. > This is hard to understand for me: > The HBase guide just said hfile.block.cache.size setting is about how much > memory used as block cache used by StoreFile. I have no idea of how HBase > works internally. Typically, it is easy to understand that increase the > size of cache should help the read, but why it will harm the write > operation? The write performance down from 30,000 to 4,000 for your > reference, just by changing the hfile.block.cache.size from 0 to 0.4. > Could anyone give me a brief explanation about this observation or give me > some advices about what to study to understand what is block cache used for? > > Another question: HBase write will first write to WAL then to memstore. > Will the write to WAL go to disk directly before hbase write memstore, a > sync operation or it is possible that write to WAL is still buffered > somewhere when hbase put the data into the memstore? > > Reading src code may cost me months, so a kindly reply will help me a > lot... ... > Thanks very much! > > Best Regards, > Ming > --001a113994feefde4105084db506--