[ 
https://issues.apache.org/jira/browse/HBASE-7905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13605783#comment-13605783
 ] 

stack commented on HBASE-7905:
------------------------------

Ran dumb test to compare before and after.

Test is too dumb though because for the current trunk, it does not include cost 
building the protobuf whereas it includes the cost building the CellBlock that 
this patch adds.

Given that, here is what I have:

I added a main to TestIPC and then just did nought but pass KVs and compared 
current trunk to what this patch adds.  Main difference between before and 
after is before takes a single Message param into which all data has already 
been serialized.  The after -- i.e. cellblocks -- takes a param and a 
CellScanner from which it then internally composes a CellBlock to pass over the 
wire... so the new stuff does composition iterating all Cells to compose in 
memory a block to send behind the rpc (it is part of what is being measured 
where as with the before, the building of the object is not measured).

The server puts what it receives back on the wire as a return.

Running a test sending a single KV there and back 1M times has before and after 
taking about the same time.

BEFORE: 13/03/18 14:50:38 INFO ipc.TestIPC: Cycled 1000000 time(s) with 1 
cell(s) in 101236ms
AFTER: 13/03/18 14:25:15 INFO ipc.TestIPC: Cycled 1000000 time(s) with 1 
cell(s) in 103746ms

If I do more Cells, say 100, they diverge more:

BEFORE: 13/03/18 13:31:09 INFO ipc.TestIPC: Cycled 1000000 time(s) with 100 
cell(s) in 113950ms
AFTER: 13/03/18 13:40:58 INFO ipc.TestIPC: Cycled 1000000 time(s) with 100 
cell(s) in 128230ms

~8%

We should add another ~8% for server-side iteration undoing the cellblock which 
this test does not do.

If I do 1000 cells, we go up to about 60% (double that if server is doing 
iterations on its side).

Let me redo the test so its a bit more of a fair comparison.

                
> Add passing of optional cell blocks over rpc
> --------------------------------------------
>
>                 Key: HBASE-7905
>                 URL: https://issues.apache.org/jira/browse/HBASE-7905
>             Project: HBase
>          Issue Type: Sub-task
>          Components: IPC/RPC
>            Reporter: stack
>            Assignee: stack
>             Fix For: 0.95.0
>
>         Attachments: 7900v12-depends-on-8101.txt, 7905.txt, 7905v13.txt, 
> 7905v14.txt, 7905v15.txt, 7905v16.txt, 7905v3.txt, 7905v4.txt, 7905v6.txt, 
> 7905v8.txt, 7905v9.txt, testipc_for_pre_cellblocks.txt
>
>
> Make it so we can pass Cells/data w/o having to bury it all in protobuf to 
> get it over the wire.

--
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

Reply via email to