hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-266) Improve SerDe performance by using Text instead of String
Date Fri, 03 Apr 2009 07:32:12 GMT

    [ https://issues.apache.org/jira/browse/HIVE-266?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695275#action_12695275
] 

Zheng Shao commented on HIVE-266:
---------------------------------

TestExpressionEvaluation also showed improvements.

Originally: (also moved result checking outside of the loop, as we do in this patch)
{code}
test:
    [junit] Running org.apache.hadoop.hive.ql.exec.TestExpressionEvaluator
    [junit] ExprNodeColumnEvaluator ok
    [junit] ExprNodeFuncEvaluator ok
    [junit] testExprNodeConversionEvaluator ok
    [junit] Evaluating 1 + 2 for 10000000 times
    [junit] Evaluation finished: 0.682 seconds, 0.068 seconds/million call.
    [junit] Evaluating 1 + 2 - 3 for 10000000 times
    [junit] Evaluation finished: 2.100 seconds, 0.210 seconds/million call.
    [junit] Evaluating 1 + 2 - 3 + 4 for 10000000 times
    [junit] Evaluation finished: 2.894 seconds, 0.289 seconds/million call.
    [junit] Evaluating concat("1", "2") for 10000000 times
    [junit] Evaluation finished: 2.284 seconds, 0.228 seconds/million call.
    [junit] Evaluating concat(concat("1", "2"), "3") for 10000000 times
    [junit] Evaluation finished: 4.120 seconds, 0.412 seconds/million call.
    [junit] Evaluating concat(concat(concat("1", "2"), "3"), "4") for 10000000 times
    [junit] Evaluation finished: 6.345 seconds, 0.635 seconds/million call.
    [junit] Evaluating concat(col1[1], cola[1]) for 1000000 times
    [junit] Evaluation finished: 0.354 seconds, 0.354 seconds/million call.
    [junit] Evaluating concat(concat(col1[1], cola[1]), col1[2]) for 1000000 times
    [junit] Evaluation finished: 0.657 seconds, 0.657 seconds/million call.
    [junit] Evaluating concat(concat(concat(col1[1], cola[1]), col1[2]), cola[2]) for 1000000
times
    [junit] Evaluation finished: 0.869 seconds, 0.869 seconds/million call.
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 20.464 sec
{code}

Now:
{code}
test:
    [junit] Running org.apache.hadoop.hive.ql.exec.TestExpressionEvaluator
    [junit] ExprNodeColumnEvaluator ok
    [junit] ExprNodeFuncEvaluator ok
    [junit] testExprNodeConversionEvaluator ok
    [junit] Evaluating 1 + 2 for 10000000 times
    [junit] Evaluation finished: 0.731 seconds, 0.073 seconds/million call.
    [junit] Evaluating 1 + 2 - 3 for 10000000 times
    [junit] Evaluation finished: 1.921 seconds, 0.192 seconds/million call.
    [junit] Evaluating 1 + 2 - 3 + 4 for 10000000 times
    [junit] Evaluation finished: 2.849 seconds, 0.285 seconds/million call.
    [junit] Evaluating concat("1", "2") for 10000000 times
    [junit] Evaluation finished: 1.303 seconds, 0.130 seconds/million call.
    [junit] Evaluating concat(concat("1", "2"), "3") for 10000000 times
    [junit] Evaluation finished: 2.522 seconds, 0.252 seconds/million call.
    [junit] Evaluating concat(concat(concat("1", "2"), "3"), "4") for 10000000 times
    [junit] Evaluation finished: 3.716 seconds, 0.372 seconds/million call.
    [junit] Evaluating concat(col1[1], cola[1]) for 1000000 times
    [junit] Evaluation finished: 0.321 seconds, 0.321 seconds/million call.
    [junit] Evaluating concat(concat(col1[1], cola[1]), col1[2]) for 1000000 times
    [junit] Evaluation finished: 0.504 seconds, 0.504 seconds/million call.
    [junit] Evaluating concat(concat(concat(col1[1], cola[1]), col1[2]), cola[2]) for 1000000
times
    [junit] Evaluation finished: 0.651 seconds, 0.651 seconds/million call.
    [junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 14.729 sec
{code}


> Improve SerDe performance by using Text instead of String
> ---------------------------------------------------------
>
>                 Key: HIVE-266
>                 URL: https://issues.apache.org/jira/browse/HIVE-266
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Serializers/Deserializers
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>            Priority: Critical
>             Fix For: 0.4.0
>
>         Attachments: HIVE-266.1.patch, HIVE-266.2.patch
>
>
> A recent performance study showed that 2 places in Hive code has exhibited large cpu
usage percentage:
> 1. String.getBytes() (UTF-8 encoding)
> 2. String.split()
> We should replace String with Text object to:
> 1. Avoid UTF-8 decoding and encoding
> 2. Reuse the Text object and avoid creating new objects for each column in each row like
in String.split()
> This is expected to give a big (20%+) performance improvement to Hive.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message