[
https://issues.apache.org/jira/browse/HBASE-5945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Devaraj Das updated HBASE-5945:
-------------------------------
Attachment: 5945-in-progress.2.1.patch
This is rebased patch (after HBASE-7479). I have updated RPC.proto in the patch
with a description of what the RPC messages are. I think we can handle the
KeyValue bytebuffers as well (in the RPC layer by defining a common interface
for Message and ByteBuffer[]). For now, I haven't done it. I only introduced a
responseBodyType blob that could be used to indicate the type of response. I
also put in a TODO in RpcServer.java explaining the interface.
bq. Is this saving a buffer copy or is it just doing what writeDelimitedTo does?
Actually, in principle it is doing the same thing as writeDelimitedTo. But
writeDelimitedTo creates a buffer internally which is of little use since we
are already writing the output to a buffer. I don't know whether this will make
any difference or not in practice but I thought why simply create a buffer
unnecessarily..I create CodedOutputStream with a buffer size of '1' (buffer
size of '0' makes it throw exceptions..).
> Reduce buffer copies in IPC server response path
> ------------------------------------------------
>
> Key: HBASE-5945
> URL: https://issues.apache.org/jira/browse/HBASE-5945
> Project: HBase
> Issue Type: Improvement
> Components: IPC/RPC
> Affects Versions: 0.96.0
> Reporter: Todd Lipcon
> Assignee: stack
> Priority: Blocker
> Fix For: 0.96.0
>
> Attachments: 5945-in-progress.2.1.patch, 5945-in-progress.2.patch,
> 5945-in-progress.patch, buffer-copies.txt, even-fewer-copies.txt,
> hbase-5495.txt
>
>
> The new PB code is sloppy with buffers and makes several needless copies.
> This increases GC time a lot. A few simple changes can cut this back down.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira