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

stack commented on HBASE-7233:
------------------------------

Here are the last few runs encoding/decoding 100k KVs with small key and value 
(so, worst case).  I did 30 cycles each encoding then decoding so hotspot would 
cut in.  I print out the last three runs of each in below.

In short, as has been said already, we can't have pb do Cell serialization.  
Its ten times slower both encoding and decoding (I had a look w/ profiler and 
doesn't seem to be anything particularly dumb going on... encoding, its just 
the copying of byte arrays out of Cell into pb ByteString and then decoding, 
its inching over the stream reading varints and allocating the arrays to copy 
into).

{code}
13/02/04 21:57:05 INFO codec.CodecPerformance: 27 encoded count=100000 in 13ms 
for encoder org.apache.hbase.codec.KeyValueEncoder@7fcebc9f
13/02/04 21:57:05 INFO codec.CodecPerformance: 28 encoded count=100000 in 13ms 
for encoder org.apache.hbase.codec.KeyValueEncoder@5dc1ac46
13/02/04 21:57:05 INFO codec.CodecPerformance: 29 encoded count=100000 in 13ms 
for encoder org.apache.hbase.codec.KeyValueEncoder@14718242

13/02/04 21:57:06 INFO codec.CodecPerformance: 26 decoded count=100000 in 16ms 
for decoder org.apache.hbase.codec.KeyValueDecoder@962522b
13/02/04 21:57:06 INFO codec.CodecPerformance: 27 decoded count=100000 in 27ms 
for decoder org.apache.hbase.codec.KeyValueDecoder@53ea0105
13/02/04 21:57:06 INFO codec.CodecPerformance: 28 decoded count=100000 in 32ms 
for decoder org.apache.hbase.codec.KeyValueDecoder@25dd9891
13/02/04 21:57:06 INFO codec.CodecPerformance: 29 decoded count=100000 in 16ms 
for decoder org.apache.hbase.codec.KeyValueDecoder@774b6b02

13/02/04 21:57:08 INFO codec.CodecPerformance: 27 encoded count=100000 in 62ms 
for encoder org.apache.hbase.codec.BasicCellEncoder@407e75d2
13/02/04 21:57:08 INFO codec.CodecPerformance: 28 encoded count=100000 in 62ms 
for encoder org.apache.hbase.codec.BasicCellEncoder@2e694f12
13/02/04 21:57:08 INFO codec.CodecPerformance: 29 encoded count=100000 in 61ms 
for encoder org.apache.hbase.codec.BasicCellEncoder@4c309f9f

13/02/04 21:57:09 INFO codec.CodecPerformance: 27 decoded count=100000 in 38ms 
for decoder org.apache.hbase.codec.BasicCellDecoder@76f1fad1
13/02/04 21:57:09 INFO codec.CodecPerformance: 28 decoded count=100000 in 37ms 
for decoder org.apache.hbase.codec.BasicCellDecoder@5ee771f3
13/02/04 21:57:09 INFO codec.CodecPerformance: 29 decoded count=100000 in 40ms 
for decoder org.apache.hbase.codec.BasicCellDecoder@1c8321c8

13/02/04 21:57:11 INFO codec.CodecPerformance: 7 decoded count=100000 in 174ms 
for decoder org.apache.hbase.codec.CellMessageDecoder@64d1afd3
13/02/04 21:57:11 INFO codec.CodecPerformance: 8 decoded count=100000 in 176ms 
for decoder org.apache.hbase.codec.CellMessageDecoder@4ecd200f
13/02/04 21:57:12 INFO codec.CodecPerformance: 9 decoded count=100000 in 175ms 
for decoder org.apache.hbase.codec.CellMessageDecoder@151cc2a8

13/02/04 21:57:15 INFO codec.CodecPerformance: 27 decoded count=100000 in 178ms 
for decoder org.apache.hbase.codec.CellMessageDecoder@4226c7da
13/02/04 21:57:15 INFO codec.CodecPerformance: 28 decoded count=100000 in 177ms 
for decoder org.apache.hbase.codec.CellMessageDecoder@5083198c
13/02/04 21:57:15 INFO codec.CodecPerformance: 29 decoded count=100000 in 186ms 
for decoder org.apache.hbase.codec.CellMessageDecoder@263b84ee

{code}
                
> Serializing KeyValues
> ---------------------
>
>                 Key: HBASE-7233
>                 URL: https://issues.apache.org/jira/browse/HBASE-7233
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>            Priority: Blocker
>             Fix For: 0.96.0
>
>         Attachments: 7233sketch.txt, 7233.txt, 7233-v2.txt, 
> 7233v3_encoders.txt, 7233v4_encoders.txt, 7233v5_encoders.txt, 
> 7233v6_encoder.txt, 7233v7.txt, 7233v9.txt
>
>
> Undo KeyValue being a Writable.

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