You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Thibault Deutsch (Jira)" <ji...@apache.org> on 2024/04/05 12:12:00 UTC

[jira] [Updated] (HBASE-28488) Avoid expensive allocation in createRegionSpan

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

Thibault Deutsch updated HBASE-28488:
-------------------------------------
    Attachment: 0001-HBASE-28488-Use-encoded-name-in-region-span-attribut.patch
        Status: Patch Available  (was: Open)

> 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
>  * 10-150 RegionServers
>  * 90-95% writes requests
>            Reporter: Thibault Deutsch
>            Priority: Minor
>         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)