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 8582910568 for ; Sat, 7 Dec 2013 13:25:07 +0000 (UTC) Received: (qmail 72135 invoked by uid 500); 7 Dec 2013 13:25:03 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 72005 invoked by uid 500); 7 Dec 2013 13:24:56 -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 71997 invoked by uid 99); 7 Dec 2013 13:24:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Dec 2013 13:24:54 +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: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.128.170] (HELO mail-ve0-f170.google.com) (209.85.128.170) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Dec 2013 13:24:48 +0000 Received: by mail-ve0-f170.google.com with SMTP id oy12so2019568veb.15 for ; Sat, 07 Dec 2013 05:24:27 -0800 (PST) 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=WZYbseZVw1rM1zWk2ahMYyptz/si9Fv8414b0rBU6rU=; b=a/MyMph42KaZQYAttn3iM5f8fKJZqBavLPPmwrlCQlsj07qwMK7nehQ8UnjTznVNl9 uDxVBcMPZR/Bqc1Vrt0iLHdO6o0OrFNKo6I3QqPWETOvEkmjtR6PBwMXrHX8Qbwa2q9g VxsnsHWJKsYLC5o+ZtIwgahhNdtRLSATA0G6rHzehqaeHr3Oc7K1gcykrjtodPtjddjK r/5vrrEFCAaXJB2Ic9MlSq6Ok790luPYmFlixUouUcJV52m+3wWzv5cZTExSUzfW6g9j KT50f62BKUpxHQXxk/GC15KSLHPhJL3eo4OS0/Jt4fM1T9J/shx/OTU3zPHH6/AIpX0q TuNw== X-Gm-Message-State: ALoCoQnHDYSveUgNtIsZKwV3irIFCBsXujp5TFmf3TpxKGeUt0ibyX4DA9tG5GKEAz+EtSsGsrTV X-Received: by 10.52.96.99 with SMTP id dr3mr3161vdb.69.1386422666873; Sat, 07 Dec 2013 05:24:26 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.24.49 with HTTP; Sat, 7 Dec 2013 05:24:06 -0800 (PST) In-Reply-To: References: From: Jean-Marc Spaggiari Date: Sat, 7 Dec 2013 08:24:06 -0500 Message-ID: Subject: Re: What is HBase compaction-queue-size at all? To: user Content-Type: multipart/alternative; boundary=20cf307ca07691c45604ecf1aec0 X-Virus-Checked: Checked by ClamAV on apache.org --20cf307ca07691c45604ecf1aec0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > So I think it includes both running compactions and those in queue. Am I missing something? Yes, that's correct. A major is just a compaction running on all the regions. So a region server will count it like a compaction. But it can also be a minor that the RS is seeing. So not necessary a major, but can be= . 2013/12/2 Bharath Vissapragada > Hi, > > > On Mon, Dec 2, 2013 at 8:07 PM, Jean-Marc Spaggiari < > jean-marc@spaggiari.org > > wrote: > > > - Is it the *number of Store* of regionserver need to be major > compacted > > ? or numbers of which is* being* compacted currently ? > > > > > > This is the number that are currently in the pipe. Doesn.'t mean they a= re > > compacting right now, but they are queued for compaction. and not > necessary > > major compaction. Major is only if all the regions need to compact. > > > > Are you sure about this? I had a quick look at the code and this value is > sum of sizes of queues largeCompactions and smallCompactions. The code > doesn't keep track of whether they are running/in the queue. So I think i= t > includes both running compactions and those in queue. Am I missing > something? > > > > "I was discovering that at some time it got *regionserver > > compaction-queue-size =3D 4*.(I check it from Ambari). That's theoretic= ally > > impossible since I have only *one Store *to write(sequential key) at an= y > > time, incurring only one major compaction is more reasonable." > > > > Adding to what JMS said, compaction is a per region thing. If your write > test creates multiple regions, there is a possibility that multiple > compactions happen at the same time since they are queued. > > > > > > Why is this "impossible"? A store file is a dump of HBase memory blocks > > written into the disk. Even if you write to a single region, single > table, > > with keys all close-by (even if it's all the same exact key). When the > > block in memory reach a threshold, it's then written into the disk. Whe= n > > more than x blocks (3 is the default) are there in disk, compaction is > > launched. > > > > - Just more confusing is : Isn't multi-thread enabled at earlier > version > > that will allocate each compaction job to a thread , by this reason > why > > there exists compaction queue waiting for processing ? > > > > Yes, compaction is done on a separate thread, but there is one single > > queue. You don't want to take 100% of you RS resources to do > compactions... > > > > Depending if you are doing mostly writes and almost no reads, you might > > want to tweek some parameters. And also, you might want to look into bu= lk > > loading... > > > > Last, maybe you should review you key and distribution. > > > > And last again ;) What is your table definition? Multiplying the column= s > > famillies can also sometime lend to this kind of issues... > > > > JM > > > > > > > > > > 2013/12/2 =E6=9E=97=E7=85=92=E6=B8=85 > > > > > Any one knows what compaction queue size is meant? > > > > > > By doc's definition: > > > > > > *9.2.5.* hbase.regionserver.compactionQueueSize Size of the compactio= n > > > queue. This is the number of stores in the region that have been > targeted > > > for compaction. > > > > > > > > > - Is it the *number of Store* of regionserver need to be major > > compacted > > > ? or numbers of which is* being* compacted currently ? > > > > > > I have a job writing data in a hotspot style using sequential key(non > > > distributed) with 1 family so that 1 Store each region. > > > > > > I was discovering that at some time it got *regionserver > > > compaction-queue-size =3D 4*.(I check it from Ambari). That's > theoretically > > > impossible since I have only *one Store *to write(sequential key) at > any > > > time, incurring only one major compaction is more reasonable. > > > > > > > > > - Then I dig into the logs ,found there is no thing about hints of > > > queue size > 0: Every major compaction just say *"This selection > was > > in > > > queue for 0sec", *I don't really understand what's it to means? is > it > > > saying hbase has nothing in compaction queue? > > > > > > 013-11-26 12:28:00,778 INFO > > > [regionserver60020-smallCompactions-1385440028938] regionserver.HStor= e: > > > Completed major compaction of 3 file(s) in f1 of myTable.key.md5.... > into > > > md5....(size=3D607.8 M), total size for store is 645.8 M.*This select= ion > > was > > > in queue for 0sec*, and took 39sec to execute. > > > > > > > > > - Just more confusing is : Isn't multi-thread enabled at earlier > > version > > > that will allocate each compaction job to a thread , by this reas= on > > why > > > there exists compaction queue waiting for processing ? > > > > > > > > > -- > Bharath Vissapragada > > --20cf307ca07691c45604ecf1aec0--