Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1AFC2927C for ; Fri, 17 Aug 2012 00:17:43 +0000 (UTC) Received: (qmail 87738 invoked by uid 500); 17 Aug 2012 00:17:38 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 87634 invoked by uid 500); 17 Aug 2012 00:17:38 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 87409 invoked by uid 99); 17 Aug 2012 00:17:38 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Aug 2012 00:17:38 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 2748F2C5BE8 for ; Fri, 17 Aug 2012 00:17:38 +0000 (UTC) Date: Fri, 17 Aug 2012 11:17:38 +1100 (NCT) From: "Lars Hofhansl (JIRA)" To: issues@hbase.apache.org Message-ID: <423977086.21978.1345162658161.JavaMail.jiratomcat@arcas> Subject: [jira] [Created] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Lars Hofhansl created HBASE-6603: ------------------------------------ Summary: RegionMetricsStorage.incrNumericMetric is called too often Key: HBASE-6603 URL: https://issues.apache.org/jira/browse/HBASE-6603 Project: HBase Issue Type: Bug Components: performance Reporter: Lars Hofhansl Assignee: Lars Hofhansl Fix For: 0.96.0, 0.94.2 Running an HBase scan load through the profiler revealed that RegionMetricsStorage.incrNumericMetric is called way too often. It turns out that we make this call for *each* KV in StoreScanner.next(...). Incrementing AtomicLong requires expensive memory barriers. The observation here is that StoreScanner.next(...) can maintain a simple long in its internal loop and only update the metric upon exit. Thus the AtomicLong is not updated nearly as often. That cuts about 10% runtime from scan only load (I'll quantify this better soon). -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira