[ 
https://issues.apache.org/jira/browse/HBASE-28488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HBASE-28488:
-----------------------------------
    Labels: pull-request-available  (was: )

> Avoid expensive allocation in createRegionSpan
> ----------------------------------------------
>
>                 Key: HBASE-28488
>                 URL: https://issues.apache.org/jira/browse/HBASE-28488
>             Project: HBase
>          Issue Type: Improvement
>          Components: tracing
>    Affects Versions: 2.5.0
>         Environment: Multiple clusters with:
>  * OpenJDK 11.0.22+7 
>  * HBase 2.5.7
>  * 90-95% writes requests
>            Reporter: Thibault Deutsch
>            Priority: Minor
>              Labels: pull-request-available
>         Attachments: 
> 0001-HBASE-28488-Use-encoded-name-in-region-span-attribut.patch, Screenshot 
> 2024-04-05 at 00.27.11.png
>
>
> On our busy clusters, the alloc profile shows that createRegionSpan() is 
> responsible for 15-20% of all the allocations. These allocations comes from 
> getRegionNameAsString().
> getRegionNameAsString() takes the region name and encode invisible characters 
> in their hex representation. This requires the use of a StringBuilder and 
> thus generate new strings every time.
> This becomes really expensive on a cluster with high number of requests. We 
> have a patch that replaced the call with getEncodedName() instead. It seems 
> better to just take the encoded region name (the md5 part) and use that in 
> trace attributes, because:
> - it's fixed in size (the full region name can be much longer depending on 
> the rowkey size),
> - it's enough information to link a trace to a region,
> - it doesn't require any new allocation.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to