[ https://issues.apache.org/jira/browse/HBASE-28556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17843699#comment-17843699 ]
Istvan Toth commented on HBASE-28556: ------------------------------------- I have run somewhat better tests with my fixed PerformanceEvaluationTool (patches not yet published): {noformat} hbase -Xmx2g org.apache.hadoop.hbase.rest.PerformanceEvaluation --host=ccycloud-1.stoty.root.comops.site:20550 ---enableSsl=false --rows=250 --api=rest_remote --nomapred=true scanRange10000 20 - JDK17, 4GB heap , patch: ~120s wall clock, 303s REST CPU usage - JDK17, 1GB heap, patch: ~130s wall clock, 340s REST CPU usage - JDK17, 4GB heap, NOpatch: ~120 wall clock, 360 REST CPU usage - JDK17, 1GB heap, NOpatch: ~150 wall clock, 405s REST CPU usage {noformat} > Reduce memory copying in Rest server when serializing CellModel to Protobuf > --------------------------------------------------------------------------- > > Key: HBASE-28556 > URL: https://issues.apache.org/jira/browse/HBASE-28556 > Project: HBase > Issue Type: Improvement > Components: REST > Reporter: Istvan Toth > Assignee: Istvan Toth > Priority: Minor > Labels: pull-request-available > > The REST server does a lot of unneccessary coping, which could be avoided at > least for protobuf encoding. > - -It uses ByteStringer to handle ByteBuffer backed Cells. However, it uses > the client API, so it should never encounter ByteBuffer backed cells.- > - It clones everything from the cells (sometimes multiple times) before > serializing to protbuf. > We could mimic the structure in Cell, with array, offset and length for each > field, in CellModel and use the appropriate protobuf setters to avoid the > extra copies. > There may or may not be a way to do the same for JSON and XML via jax-rs, I > don't know the frameworks well enough to tell, but if not, we could just do > the copying in the getters for them, which would not make things worse. -- This message was sent by Atlassian Jira (v8.20.10#820010)