[ 
https://issues.apache.org/jira/browse/HBASE-26018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17383523#comment-17383523
 ] 

Andrew Kyle Purtell edited comment on HBASE-26018 at 7/19/21, 7:05 PM:
-----------------------------------------------------------------------

[~vjasani] I asked this question on the PR:
{quote}{quote}Atomically retaining refCount is coming up bit expensive in terms 
of performance
{quote}
In what context? What test case? What does "bit expensive" mean? Can we see the 
data?
{quote}
It might help here, and going forward, to post the complete flamegraph svg when 
posting them, so we can see the totality of on CPU stacks and visually identify 
the proportion of your area of interest, As well as a png or jpg that shows 
that area of focus. Just a suggestion.


was (Author: apurtell):
[~vjasani] I asked this question on the PR:
{quote}
bq. Atomically retaining refCount is coming up bit expensive in terms of 
performance
In what context? What test case? What does "bit expensive" mean? Can we see the 
data?
{quote}

It might help here, and going forward, to post the complete flamegraph svg when 
posting them. As well as a png or jpg that shows your area of focus. Just a 
suggestion.

> Perf improvement in L1 cache
> ----------------------------
>
>                 Key: HBASE-26018
>                 URL: https://issues.apache.org/jira/browse/HBASE-26018
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 3.0.0-alpha-1, 2.3.5, 2.4.4
>            Reporter: Viraj Jasani
>            Assignee: Viraj Jasani
>            Priority: Major
>             Fix For: 2.5.0, 2.3.6, 3.0.0-alpha-2, 2.4.5
>
>         Attachments: computeIfPresent.png
>
>
> After HBASE-25698 is in, all L1 caching strategies perform buffer.retain() in 
> order to maintain refCount atomically while retrieving cached blocks 
> (CHM#computeIfPresent). Retaining refCount is coming up bit expensive in 
> terms of performance. Using computeIfPresent API, CHM uses coarse grained 
> segment locking and even if our computation is not so complex (we just call 
> block retain API), it will block other update APIs for the keys within bucket 
> that is locked. computeIfPresent keeps showing up on flame graphs as well 
> (attached one of them). Specifically when we see aggressive cache hits for 
> meta blocks (with major blocks in cache), we would want to get away from 
> coarse grained locking.
> One of the suggestions came up while reviewing PR#3215 is to treat cache read 
> API as optimistic read and deal with block retain based refCount issues by 
> catching the respective Exception and let it treat as cache miss. This should 
> allow us to go ahead with lockless get API.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to