You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Charles Connell (Jira)" <ji...@apache.org> on 2025/07/01 14:53:00 UTC

[jira] [Updated] (HBASE-29253) Avoid allocating a new closure on every row processed by StoreScanner

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

Charles Connell updated HBASE-29253:
------------------------------------
    Fix Version/s: 4.0.0-alpha-1

> Avoid allocating a new closure on every row processed by StoreScanner
> ---------------------------------------------------------------------
>
>                 Key: HBASE-29253
>                 URL: https://issues.apache.org/jira/browse/HBASE-29253
>             Project: HBase
>          Issue Type: Improvement
>          Components: Scanners
>            Reporter: Charles Connell
>            Assignee: Charles Connell
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 4.0.0-alpha-1, 2.7.0, 3.0.0-beta-2, 2.6.3
>
>         Attachments: scenario-alloc-hs26.html
>
>
> I've looked at a lot of allocation profiles of RegionServers doing a read-heavy workload. Some allocations that dominate the chart can be easily avoided. The method {{StoreScanner#read()}} contains this code
> {code:java}
>         heap.recordBlockSize(blockSize -> {
>           if (rpcCall.isPresent()) {
>             rpcCall.get().incrementBlockBytesScanned(blockSize);
>           }
>           scannerContext.incrementBlockProgress(blockSize);
>         });
> {code}
> that runs for every iteration of its main loop. A closure can be created before the loop and re-used instead.
> On the attached profile, the resulting closures account for 11% of the allocations done. This is from a load test done with a lot of scans on a ROW_INDEX_V1 table.



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