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

Duo Zhang resolved HBASE-29253.
-------------------------------
    Fix Version/s: 2.7.0
                   3.0.0-beta-2
                   2.6.3
     Hadoop Flags: Reviewed
       Resolution: Fixed

Pushed to branch-2.6+.

Thanks [~charlesconnell]!

> 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
>            Reporter: Charles Connell
>            Assignee: Charles Connell
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 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)

Reply via email to