[ 
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

        

Reply via email to