[
https://issues.apache.org/jira/browse/HBASE-29160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Charles Connell updated HBASE-29160:
------------------------------------
Description:
I've noticed that tracing can add meaningful CPU cycles to each HBase query.
This is easy to correct, it turns out. Creating a tracing span is slow because
region names are attached to the spans, and calls to
{{RegionInfo#getRegionNameAsString()}} are expensive. This method re-generates
the region name string on each call, which is not necessary. In this ticket
I'll make it cache this string.
See the attached CPU-time profiles where {{getRegionNameAsString()}} occupies
0.5% - 2%.
was:
I've noticed that tracing can add meaningful CPU cycles to each HBase query.
This is easy to correct, it turns out. Creating a tracing span is slow because
region names are attached to the spans, and calls to
{{RegionInfo#getRegionNameAsString()}} are expensive. This method re-generates
the region name string on each call, which is not necessary. In this ticket
I'll make it cache this string.
See the attached CPU-time profiles where {{getRegionNameAsString()}} occupies
0.5% - 2% CPU time.
> Cache result of getRegionNameAsString()
> ---------------------------------------
>
> Key: HBASE-29160
> URL: https://issues.apache.org/jira/browse/HBASE-29160
> Project: HBase
> Issue Type: Improvement
> Reporter: Charles Connell
> Assignee: Charles Connell
> Priority: Minor
> Labels: pull-request-available
> Attachments: slow-region-name-1.html, slow-region-name-2.html,
> slow-region-name-3.html
>
>
> I've noticed that tracing can add meaningful CPU cycles to each HBase query.
> This is easy to correct, it turns out. Creating a tracing span is slow
> because region names are attached to the spans, and calls to
> {{RegionInfo#getRegionNameAsString()}} are expensive. This method
> re-generates the region name string on each call, which is not necessary. In
> this ticket I'll make it cache this string.
> See the attached CPU-time profiles where {{getRegionNameAsString()}} occupies
> 0.5% - 2%.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)