You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Lars Hofhansl (JIRA)" <ji...@apache.org> on 2012/08/17 02:17:38 UTC

[jira] [Created] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439510#comment-13439510 ] 

Hudson commented on HBASE-6603:
-------------------------------

Integrated in HBase-0.94-security #48 (See [https://builds.apache.org/job/HBase-0.94-security/48/])
    HBASE-6603 RegionMetricsStorage.incrNumericMetric is called too often (M. Chen and Lars H) (Revision 1375318)

     Result = FAILURE
larsh : 
Files : 
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java

                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438954#comment-13438954 ] 

Lars Hofhansl commented on HBASE-6603:
--------------------------------------

Also note that for scans with few columns the collection of this metric still shows up and consumes a significant portion of the time.
Are these metric that useful (total get size, total next size)? Can we remove them (or at least optionally not collect them)?
                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Updated] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl updated HBASE-6603:
---------------------------------

    Attachment: 6503-0.96.txt

Here's a version of the HBASE-6217 patch for trunk.

In an extreme test with Gets of 60.000 columns the time went from about 164ms/iteration to 124ms.

                
> 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
>
>         Attachments: 6503-0.96.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438958#comment-13438958 ] 

stack commented on HBASE-6603:
------------------------------

@Lars Thats another issue?
                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13439054#comment-13439054 ] 

Lars Hofhansl commented on HBASE-6603:
--------------------------------------

@Stack: For sure, just wanted to gauge what the general opinion is.

                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436498#comment-13436498 ] 

Lars Hofhansl commented on HBASE-6603:
--------------------------------------

I should say that I tested with very wide rows. With narrow rows the percentage gain is probably less.
                
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Enis Soztutar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438304#comment-13438304 ] 

Enis Soztutar commented on HBASE-6603:
--------------------------------------

Great find. Can we merge to 0.92 as well. 
                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Kannan Muthukkaruppan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436495#comment-13436495 ] 

Kannan Muthukkaruppan commented on HBASE-6603:
----------------------------------------------

Also mentioned as item #4 in https://issues.apache.org/jira/browse/HBASE-6066. I think a patch for this is already out. Let me check.
                
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436520#comment-13436520 ] 

stack commented on HBASE-6603:
------------------------------

This is a dup of hbase-6217 then?
                
> 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

        

[jira] [Updated] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl updated HBASE-6603:
---------------------------------

    Fix Version/s: 0.92.2

Committed to 0.94 and 0.96.
                
> 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: M. Chen
>             Fix For: 0.92.2, 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt
>
>
> 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

        

[jira] [Updated] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl updated HBASE-6603:
---------------------------------

    Attachment: 6603-0.94.txt
    
> 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: M. Chen
>             Fix For: 0.92.2, 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438105#comment-13438105 ] 

stack commented on HBASE-6603:
------------------------------

+1
                
> 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
>
>         Attachments: 6503-0.96.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438294#comment-13438294 ] 

Lars Hofhansl commented on HBASE-6603:
--------------------------------------

OK... Going to commit soon. @Kannan: This is essentially the same patch as in HBASE-6217. I'll attribute it to M.Chen.
                
> 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
>
>         Attachments: 6503-0.96.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Kannan Muthukkaruppan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436497#comment-13436497 ] 

Kannan Muthukkaruppan commented on HBASE-6603:
----------------------------------------------

Item #4 in HBASE-6066 was forked off into HBASE-6217.

                
> 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

        

[jira] [Resolved] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl resolved HBASE-6603.
----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.92.2)

Turns out that 0.92 does not collect this metric, so backport is not needed.
                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437636#comment-13437636 ] 

Lars Hofhansl commented on HBASE-6603:
--------------------------------------

Sure. Just make a 0.94/0.96 patch there. Patch there looks good to me. (copykv is gone now, though).

                
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Elliott Clark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436465#comment-13436465 ] 

Elliott Clark commented on HBASE-6603:
--------------------------------------

wow that's a huge perf gain.
Thanks.
                
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Kannan Muthukkaruppan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438408#comment-13438408 ] 

Kannan Muthukkaruppan commented on HBASE-6603:
----------------------------------------------

Thanks Lars.
                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "stack (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436792#comment-13436792 ] 

stack commented on HBASE-6603:
------------------------------

bq. Damn, and I was so proud of my profiling detective work.

You impressed me.

bq. ...or leave HBASE-6217 against fb89 only and use this for the 0.94 and 0.96 patches?

That makes sense I'd say.  Easier to track (having this issue for trunk and 0.94 and hbase-6217 for 89fb)
                
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Kannan Muthukkaruppan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13437106#comment-13437106 ] 

Kannan Muthukkaruppan commented on HBASE-6603:
----------------------------------------------

but any reason the same patch (as 89fb) wouldn't work for trunk as well? I was checking into 89fb tree yet, and looks like the change hasn't been committed there either. Following up with Michael Chen.
 
                
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438624#comment-13438624 ] 

Hudson commented on HBASE-6603:
-------------------------------

Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #140 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/140/])
    HBASE-6603 RegionMetricsStorage.incrNumericMetric is called too often (M. Chen) (Revision 1375312)

     Result = FAILURE
larsh : 
Files : 
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java

                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Assigned] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lars Hofhansl reassigned HBASE-6603:
------------------------------------

    Assignee: M. Chen  (was: Lars Hofhansl)
    
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438372#comment-13438372 ] 

Hudson commented on HBASE-6603:
-------------------------------

Integrated in HBase-0.94 #410 (See [https://builds.apache.org/job/HBase-0.94/410/])
    HBASE-6603 RegionMetricsStorage.incrNumericMetric is called too often (M. Chen and Lars H) (Revision 1375318)

     Result = FAILURE
larsh : 
Files : 
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java

                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13448298#comment-13448298 ] 

Hudson commented on HBASE-6603:
-------------------------------

Integrated in HBase-0.94-security-on-Hadoop-23 #7 (See [https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/7/])
    HBASE-6603 RegionMetricsStorage.incrNumericMetric is called too often (M. Chen and Lars H) (Revision 1375318)

     Result = FAILURE
larsh : 
Files : 
* /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java

                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13438380#comment-13438380 ] 

Hudson commented on HBASE-6603:
-------------------------------

Integrated in HBase-TRUNK #3246 (See [https://builds.apache.org/job/HBase-TRUNK/3246/])
    HBASE-6603 RegionMetricsStorage.incrNumericMetric is called too often (M. Chen) (Revision 1375312)

     Result = FAILURE
larsh : 
Files : 
* /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java

                
> 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: M. Chen
>             Fix For: 0.96.0, 0.94.2
>
>         Attachments: 6503-0.96.txt, 6603-0.94.txt
>
>
> 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

        

[jira] [Commented] (HBASE-6603) RegionMetricsStorage.incrNumericMetric is called too often

Posted by "Lars Hofhansl (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HBASE-6603?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13436538#comment-13436538 ] 

Lars Hofhansl commented on HBASE-6603:
--------------------------------------

The patch in HBASE-6217 is similar to the change that I had made locally. (I did not add a try/finally block, but instead updated the metric at the spots where the method returns. But it's the same in principle)

Damn, and I was so proud of my profiling detective work. :)

So, should I close this as dup and mark HBASE-6217 against 0.94 and 0.96 also? Or leave HBASE-6217 against fb89 only and use this for the 0.94 and 0.96 patches?

                
> 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