Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7C01C200C10 for ; Fri, 3 Feb 2017 22:47:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7A91E160B43; Fri, 3 Feb 2017 21:47:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 9EE6E160B3F for ; Fri, 3 Feb 2017 22:47:05 +0100 (CET) Received: (qmail 14023 invoked by uid 500); 3 Feb 2017 21:47:04 -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 14011 invoked by uid 99); 3 Feb 2017 21:47:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Feb 2017 21:47:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 8FC8B18231E for ; Fri, 3 Feb 2017 21:47:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id THqyP1cdaLTC for ; Fri, 3 Feb 2017 21:47:00 +0000 (UTC) Received: from mail-yb0-f182.google.com (mail-yb0-f182.google.com [209.85.213.182]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A3A325FB73 for ; Fri, 3 Feb 2017 21:46:59 +0000 (UTC) Received: by mail-yb0-f182.google.com with SMTP id o65so10082359ybo.2 for ; Fri, 03 Feb 2017 13:46:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=BF0jXkcIHab4mmCzZN/GoWlQ2uyj9KhWeWo2X+B5aCY=; b=N9Zo6BSutXYngXK5NASXdBFcM53XoFqgN0A+BZonLAYJWGg9BHtYZaHvg9dJKbO4T8 b1nyzvq8/IIBPJhk/XOvKKVUBqr3boche5briLZ9xbbqa/vVS3WBSGhy8HO0wRWQ0IAp yBe4wcmoAG4EzrezskB2fY49QnObnL3rqh35e3wSUE2MlpLX8cLlOJC9k7v7RpxbBNT3 V15UWQp4d6OaAoFV9odzlkqOEheH5fxe2LECFq5xLNwhplfpDPJFZNdwseJBJWDoRzZH fxCgBOCHRW+8zKR+u9NKmJS/LABZZA+ove0/AyGJFFGSYNYN4zFVPCT1dHj2GcM71UO2 zbng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=BF0jXkcIHab4mmCzZN/GoWlQ2uyj9KhWeWo2X+B5aCY=; b=P6wDhjQXnjgLorJw7Vrpd3Z08bX/jOWicJiE+uK7CuV4O0wSPFAcfMfAHofLyltfx9 zfQETyOmNtqNwKmC3GIKCWV2VZjLSHzk4jI1mzyDaZrPIOPhgKnu+JetZw8nl3eD0Whz KI4J+VQIaSd5S2+Cqm6gRS2ZX7vf9x6hQ+RAWbOzPCZgYwzYUiEx58/jSkeh6MajG64S dT5NbEfqUfvLVH3hDMxjLOKikOEoz5pN+kx7igKMK6UbjRsCoBQeeV/7nI3lBUFbTJc3 Nv/ES+FemCeDC6fFznrr7A7N9Mtqfj9+gdSvF57lsA43YXkB4mK9C0ceJ2SeeyrpB1RZ t1eA== X-Gm-Message-State: AIkVDXI4veYZH8hWuDzwvZVIRXYonYpxCDJX5v3APbMJng/DmkIukWX5IMm4sPBl5KFIwCj54x117gJNzX+Vhg== X-Received: by 10.37.59.140 with SMTP id i134mr8131101yba.125.1486158412899; Fri, 03 Feb 2017 13:46:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.170.104 with HTTP; Fri, 3 Feb 2017 13:46:52 -0800 (PST) In-Reply-To: <239C5132291A8942B4FD0836BD66EFE3918B34D6@ORD2MBX05C.mex05.mlsrvr.com> References: <239C5132291A8942B4FD0836BD66EFE3918B3142@ORD2MBX05C.mex05.mlsrvr.com> <5894F096.707@apache.org> <239C5132291A8942B4FD0836BD66EFE3918B34D6@ORD2MBX05C.mex05.mlsrvr.com> From: Ted Yu Date: Fri, 3 Feb 2017 13:46:52 -0800 Message-ID: Subject: Re: Hbase Architecture Questions To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=94eb2c0ef4d847ee120547a738ef archived-at: Fri, 03 Feb 2017 21:47:06 -0000 --94eb2c0ef4d847ee120547a738ef Content-Type: text/plain; charset=UTF-8 bq. We use Hbase 1.0.0 1.0.0 was quite old. Can you try more recent releases such as 1.3.0 (the hbase-thrift module should be more robust) ? If your nodes have enough memory, have you thought of using bucket cache to improve read performance ? Cheers On Fri, Feb 3, 2017 at 1:34 PM, Akshat Mahajan wrote: > > By "After Hadoop runs", you mean a batch collection/processing job? > MapReduce? Hadoop is a collection of distributed processing tools: > Filesystem (HDFS) and distributed execution (YARN)... > > Yes, we mean a batch collection/processing job. We use Yarn and HDFS, and > we employ the Hadoop API to run only mappers (we do not need to perform > reductions on our data) in Java. But the collection happens through Python, > necessitating the use of Thrift, and the actual processing happens through > Yarn. > > > If you are deleting the table in a short period of time, then, yes, > disabling major compactions is probably "OK". However, not running major > compactions will have read performance implications. While there are > tombstones, these represent extra work that your regionservers must perform. > > Can you please clarify? Our understanding is that a table deletion will > close the entire region corresponding to that table across all > RegionServers. If that is correct, why should there be a read performance > issue? (I'm assuming that closed regions are never accessed again by the > regionservers - am I correct?). > > > It sounds like you could just adopt a bulk-loading approach instead of > doing live writes into HBase.. > > This is certainly a possibility, but would require a fairly sizable > rewrite for our application. > > > I doubt REST is ever going to be a "well-performing" tool. You're > likely chasing your tail to try to optimize this. Your time would be better > spent using the HBase Java API directly. > > We are constrained by having to use Python, so we can't use the native > API. We switched from Thrift to REST when we found Thrift kept dying under > the load we put it under. > > > Are you taxing your machines' physical resources? What does I/O, CPU and > memory utilization look like? > > Let me get back to you on this front more fully in a followup. > > Currently providing estimates for our bulkier and more problematic cluster: > > We are not constrained by memory - our free memory utilisation on all the > regionservers is close to 99%, but about 40% of that in each RS is used in > caches that will be readily given to any programs that require it by the > kernel (as assessed by `free`). On the master node, it is closer to 60% > memory utilisation. > > Our CPU utilisation varies, but under regular operation, user time is at > 60 - 40 percent on all regionservers. CPU idle time is very high, usually, > about 90%, and CPU system time is about 5%. > > I/O wait time is very, very low - about 0.23% on average. > > > Yeah I'm not sure why you are doing this. There's no reason I can think > of as to why you would need to do this... > > Believe it or not, it is the only thing we have found that helps us > restore performance temporarily. > > It's not ideal, and we don't want to keep doing it, though. > > Akshat > > > -----Original Message----- > From: Josh Elser [mailto:elserj@apache.org] > Sent: Friday, February 03, 2017 1:05 PM > To: user@hbase.apache.org > Subject: Re: Hbase Architecture Questions > > > > Akshat Mahajan wrote: > > > b) Every table in our Hbase is associated with a unique collection of > items, and all tables exhibit the same column families (2 column families). > After Hadoop runs, we no longer require the tables, so we delete them. > Individual rows are never removed; instead, entire tables are removed at a > time. > > By "After Hadoop runs", you mean a batch collection/processing job? > MapReduce? Hadoop is a collection of distributed processing tools: > Filesystem (HDFS) and distributed execution (YARN)... > > > a) _We have turned major compaction off_. > > > > We are aware this is against recommended advice. Our reasoning for > > this is that > > > > 1) periods of major compaction degrade both our read and write > > performance heavily (to the point our schedule is delayed beyond > > tolerance), and > > 2) all our tables are temporary - we do not intend to keep them around, > and disabling/deleting old tables closes entire regions altogether and > should have the same effect as major compaction processing tombstone > markers on rows. Read performance should then theoretically not be impacted > - we expect that the RegionServer will never even consult that region in > doing reads, so storefile buildup overall should not be an issue. > > If you are deleting the table in a short period of time, then, yes, > disabling major compactions is probably "OK". > > However, not running major compactions will have read performance > implications. While there are tombstones, these represent extra work that > your regionservers must perform. > > > > > b) _We have made additional efforts to turn off minor compactions as > much as possible_. > > > > In particular, our hbase.hstore.compaction.max.size is set to 500 MB, > our hbase.hstore.compactionThreshold is set to 1000 bytes. We do this in > order to prevent a minor compaction from becoming a major compaction - > since we cannot prevent that, we were forced to try and prevent minor > compactions running at all. > > It sounds like you could just adopt a bulk-loading approach instead of > doing live writes into HBase.. > > > c) We have tried to make REST more performant by improving the number > of REST threads to about 9000. > > > > This figure is derived from counting the number of connections on REST > during periods of high write load. > > I doubt REST is ever going to be a "well-performing" tool. You're likely > chasing your tail to try to optimize this. Your time would be better > spent using the HBase Java API directly. > > > d) We have turned on bloom filters, use an LRUBlockCache which caches > data only on reads, and have set tcpnodelay to true. These were in place > before we turned major compaction off. > > > > Our observations with these settings in performance: > > > > a) We are seeing an impact on both read/write performance correlated > strongly with store file buildup. Our store files number between 500 to > 1500 on each RS - the total size on each RegionServer are on the order 100 > to 200 GBs at worst. > > b) As number of connections on Hbase REST rises, write performance is > impacted. We originally believed this was due to high frequency of memstore > flushes - but increasing the memstore buffer sizes has had no discernible > impact on read/write. Currently, our callqueue.handler.size is set to 100 - > since we experience over 100 requests/second on each RS, we are considering > increasing this to about 300 so we can handle more requests concurrently. > Is this a good change, or are other changes needed as well? > > Are you taxing your machines' physical resources? What does I/O, CPU and > memory utilization look like? > > > Unfortunately, we cannot provide raw metrics on the magnitude of > read/write performance degradation as we do not have sufficient tracking > for them. A rough proxy - we do know our clusters are capable of processing > 200 jobs in an hour. This now goes down to as low as 30-50 jobs per hour > with minimal changes to the jobs themselves. We wish to be able to get back > to our original performance. > > > > For now, in periods of high stress (large jobs or quick reads/writes), > we are manually clearing out the hbase folder in HDFS (including store > files, WALs, oldWALs and archived files), and resetting our clusters to an > empty state. We are aware this is not ideal, and are looking for ways to > not have to do this. Our understanding of how Hbase works is probably > imperfect, and we would appreciate any advice or feedback in this regard. > > Yeah I'm not sure why you are doing this. There's no reason I can think > of as to why you would need to do this... > --94eb2c0ef4d847ee120547a738ef--