Gary Helmling updated HBASE-16146:
    Attachment: HBASE-16146.branch-1.3.001.patch

The attached patch removes the use of an instance-level ThreadLocal in Counter 
to store the per-thread last used cell index.  Instead, we just recompute the 
hash for each access.  This comes at a bit of a cost for writes, but provides 
big memory savings when many counters are in use, as well as avoiding spinning 
in ThreadLocalMap.getEntryAfterMiss().

> Counters are expensive...
> -------------------------
>                 Key: HBASE-16146
>                 URL: https://issues.apache.org/jira/browse/HBASE-16146
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: stack
>         Attachments: HBASE-16146.branch-1.3.001.patch, counters.patch, 
> less_and_less_counters.png
> Doing workloadc, perf shows 10%+ of CPU being spent on counter#add. If I 
> disable some of the hot ones -- see patch -- I can get 10% more throughput 
> (390k to 440k). Figure something better.

This message was sent by Atlassian JIRA

Reply via email to