[
https://issues.apache.org/jira/browse/HBASE-21459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16701319#comment-16701319
]
Zheng Hu edited comment on HBASE-21459 at 11/28/18 2:38 AM:
------------------------------------------------------------
[~stack], I made two test:
1. benchmark the checkKeyValueBytes() method by using JMH framework to
exclude the JIT's impact. the result is here:
https://issues.apache.org/jira/secure/attachment/12949680/jmh-testing.log . I
think we can mainly focuse on the last part in the result, it means the avg
time cost after call the checkKeyValueBytes multiple times (diff rowKey,
valuleLen, tagSize etc..)
{code}
Benchmark (input) Mode Cnt
Score Error Units
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,1,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,100,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,10000,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,1,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,100,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,10000,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,1,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,100,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,10000,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,1,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,100,1 avgt 10
0.030 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,10000,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,1,1 avgt 10
0.030 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,100,1 avgt 10
0.030 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,10000,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,1,1 avgt 10
0.030 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,100,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,10000,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,1,10 avgt 10
0.062 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,100,10 avgt 10
0.060 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,10000,10 avgt 10
0.060 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,1,10 avgt 10
0.060 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,100,10 avgt 10
0.061 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,10000,10 avgt 10
0.061 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,1,10 avgt 10
0.061 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,100,10 avgt 10
0.061 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,10000,10 avgt 10
0.061 ± 0.001 us/op
{code}
2. benchmark the checkKeyValueBytes method directly by using patch [1], the
result is here: [2]. Also indicate: in diff cases (rowLen, valueLen, tagSize,
rowSize), the avg time cost (ns/op) after call the method multiple times.
Currently, I'm focusing on testing the single method, not by starting cluster
with the validatation patch or without patch... I think the single method
performance is enough to proof that it has minor impact on the read/write
performance. Thanks.
1.
https://issues.apache.org/jira/secure/attachment/12949036/0002-Benchmark-the-checkKeyValueBytes.patch
2. https://issues.apache.org/jira/secure/attachment/12949038/result.txt
was (Author: openinx):
[~stack], I made two test:
1. benchmark the checkKeyValueBytes() method by using JMH framework to
exclude the JIT's impact. the result is here:
https://issues.apache.org/jira/secure/attachment/12949680/jmh-testing.log . I
think we can mainly focuse on the last part in the result, it means the avg
time cost after call the checkKeyValueBytes multiple times (diff rowKey,
tagSize, valuleLen etc..)
{code}
Benchmark (input) Mode Cnt
Score Error Units
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,1,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,100,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,10000,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,1,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,100,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,10000,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,1,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,100,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,10000,0 avgt 10
0.024 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,1,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,100,1 avgt 10
0.030 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,10000,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,1,1 avgt 10
0.030 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,100,1 avgt 10
0.030 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,10000,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,1,1 avgt 10
0.030 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,100,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,10000,1 avgt 10
0.029 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,1,10 avgt 10
0.062 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,100,10 avgt 10
0.060 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 1,10000,10 avgt 10
0.060 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,1,10 avgt 10
0.060 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,100,10 avgt 10
0.061 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 10,10000,10 avgt 10
0.061 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,1,10 avgt 10
0.061 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,100,10 avgt 10
0.061 ± 0.001 us/op
TestCheckKeyValueBytes.benchmarkCheckKeyValueBytes 100,10000,10 avgt 10
0.061 ± 0.001 us/op
{code}
2. benchmark the checkKeyValueBytes method directly by using patch [1], the
result is here: [2]. Also indicate: in diff cases (rowLen, valueLen, tagSize,
rowSize), the avg time cost (ns/op) after call the method multiple times.
Currently, I'm focusing on testing the single method, not by starting cluster
with the validatation patch or without patch... I think the single method
performance is enough to proof that it has minor impact on the read/write
performance. Thanks.
1.
https://issues.apache.org/jira/secure/attachment/12949036/0002-Benchmark-the-checkKeyValueBytes.patch
2. https://issues.apache.org/jira/secure/attachment/12949038/result.txt
> More benchmark for evaluating the checkKeyValueBytes's performance
> ------------------------------------------------------------------
>
> Key: HBASE-21459
> URL: https://issues.apache.org/jira/browse/HBASE-21459
> Project: HBase
> Issue Type: Sub-task
> Reporter: Zheng Hu
> Assignee: Zheng Hu
> Priority: Major
> Attachments: 0001-Benchmark-the-checkKeyValueBytes.patch,
> 0001-HBASE-21401-Sanity-check-in-BaseDecoder-parseCell.patch,
> 0002-Benchmark-the-checkKeyValueBytes.patch, jmh-testing.log, result.txt
>
>
> See :
> https://issues.apache.org/jira/browse/HBASE-21401?focusedCommentId=16678091&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16678091
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)