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 7A02BDC63 for ; Mon, 26 Nov 2012 18:22:01 +0000 (UTC) Received: (qmail 34236 invoked by uid 500); 26 Nov 2012 18:22:00 -0000 Delivered-To: apmail-hbase-dev-archive@hbase.apache.org Received: (qmail 34166 invoked by uid 500); 26 Nov 2012 18:22:00 -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 34157 invoked by uid 99); 26 Nov 2012 18:22:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 18:22:00 +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 (athena.apache.org: domain of nkeywal@gmail.com designates 209.85.217.169 as permitted sender) Received: from [209.85.217.169] (HELO mail-lb0-f169.google.com) (209.85.217.169) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Nov 2012 18:21:54 +0000 Received: by mail-lb0-f169.google.com with SMTP id gk1so10795193lbb.14 for ; Mon, 26 Nov 2012 10:21:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=WX+ftJBI/NGMbMSD6XHfZNANNWCKNOEh3kx1y1tvHHw=; b=s6c8Y3fqubPhSBWla/1hCOY2+lZCmAN3xgQZlsvKMChz7UjQ7sK5sHRVg6zLSlT3RP 0VIsOgGasX7HUr+nlBYIc2UpeO9/sZgO+eFxukMv6wK+bQ8Zvi5kzPg3a9sWJ9PLwWQk WRiQXuX9mlRus5ZVLtPwcYoVB1oP38Rv72OO0AT59S5s27VxY71cdFo7neMcjunTmsfs dKE6srVW29E73n5o7mmewThvTFHd75nsm8RKdlQpyLMkciqCmQ1o0+yL9dtJE475KWRJ SQg1feA2gCEEHZuU6n218cmpXzUOGT2aFoWrB3bp7iSPGk/SVaN6nT2HCD9PRFM/PDAa VzUg== Received: by 10.152.103.38 with SMTP id ft6mr11779744lab.40.1353954092344; Mon, 26 Nov 2012 10:21:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.8.9 with HTTP; Mon, 26 Nov 2012 10:21:11 -0800 (PST) From: Nicolas Liochon Date: Mon, 26 Nov 2012 19:21:11 +0100 Message-ID: Subject: metrics / performance impact To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=f46d040715fdb764d304cf6a00bb X-Virus-Checked: Checked by ClamAV on apache.org --f46d040715fdb764d304cf6a00bb Content-Type: text/plain; charset=ISO-8859-1 Hi All, I've got an issue related to metrics in HBase trunk. I'm trying to create a table with 3000 regions on two regions servers, from the shell. It's ok on a standalone config. It's ok on 0.94 It's not ok on trunk: it fails after around 1 hour. If I remove all the code related to metrics in HRegion, the 3000 regions are created in 3 minutes (twice faster than the 0.94). When it fails the region server spends its time in "waitForWork", while the master is in the tcp connection related code. It's a 1Gb network. I haven't looked at the metric code itself. So two questions :-) 1) Is there any work in progress on the metrics? I agree that my case makes no sense in production, but it's useful for testing (and may be there are production uses cases that are impacted as well.) 2) Is there any simple way to disable the metrics? See below the changes I made to HRegion Cheers, Nicolas -- index c70e9ab..6677e65 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java @@ -364,7 +364,7 @@ public class HRegion implements HeapSize { // , Writable{ private HTableDescriptor htableDescriptor = null; private RegionSplitPolicy splitPolicy; - private final MetricsRegion metricsRegion; + private final MetricsRegion metricsRegion = null; /** * Should only be used for testing purposes @@ -388,7 +388,7 @@ public class HRegion implements HeapSize { // , Writable{ this.coprocessorHost = null; this.scannerReadPoints = new ConcurrentHashMap(); - this.metricsRegion = new MetricsRegion(new MetricsRegionWrapperImpl(this)); + //this.metricsRegion = new MetricsRegion(new MetricsRegionWrapperImpl(this)); } /** @@ -451,7 +451,7 @@ public class HRegion implements HeapSize { // , Writable{ this.regiondir = getRegionDir(this.tableDir, encodedNameStr); this.scannerReadPoints = new ConcurrentHashMap(); - this.metricsRegion = new MetricsRegion(new MetricsRegionWrapperImpl(this)); + //this.metricsRegion = new MetricsRegion(new MetricsRegionWrapperImpl(this)); /* * timestamp.slop provides a server-side constraint on the timestamp. This @@ -1024,7 +1024,7 @@ public class HRegion implements HeapSize { // , Writable{ status.setStatus("Running coprocessor post-close hooks"); this.coprocessorHost.postClose(abort); } - this.metricsRegion.close(); + //this.metricsRegion.close(); status.markComplete("Closed"); LOG.info("Closed " + this); return result; @@ -2331,11 +2331,11 @@ public class HRegion implements HeapSize { // , Writable{ if (noOfPuts > 0) { // There were some Puts in the batch. double noOfMutations = noOfPuts + noOfDeletes; - this.metricsRegion.updatePut(); + //this.metricsRegion.updatePut(); } if (noOfDeletes > 0) { // There were some Deletes in the batch. - this.metricsRegion.updateDelete(); + //this.metricsRegion.updateDelete(); } if (!success) { for (int i = firstIndex; i < lastIndexExclusive; i++) { @@ -4270,7 +4270,7 @@ public class HRegion implements HeapSize { // , Writable{ // do after lock - this.metricsRegion.updateGet(); + //this.metricsRegion.updateGet(); return results; } @@ -4657,7 +4657,7 @@ public class HRegion implements HeapSize { // , Writable{ closeRegionOperation(); } - this.metricsRegion.updateAppend(); + //this.metricsRegion.updateAppend(); if (flush) { @@ -4795,7 +4795,7 @@ public class HRegion implements HeapSize { // , Writable{ mvcc.completeMemstoreInsert(w); } closeRegionOperation(); - this.metricsRegion.updateIncrement(); + //this.metricsRegion.updateIncrement(); } if (flush) { --f46d040715fdb764d304cf6a00bb--