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

ASF subversion and git services commented on IMPALA-10323:
----------------------------------------------------------

Commit c9aa60a0ff8bf558f2dbf2fa794209ce355053dd in impala's branch 
refs/heads/master from wesleydeng
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=c9aa60a ]

IMPALA-10323: use gutil to cast int to string

Using gutil instead of lexical_cast when casting int type
value to string, performance can be improved significantly
in multi-thread mode. In contrast, performance using
lexical_cast decreased seriously in multi-thread mode.
For example:
when mt_dop=8, this change can get 20x performance
improvement;
when mt_dop=0, this change can get 2x performance
improvement;

Change-Id: Ief1d6b2c2cb5961c1d6cee1b0eac86ab61509768
Reviewed-on: http://gerrit.cloudera.org:8080/16719
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Csaba Ringhofer <[email protected]>


> use snprintf instead of lexical_cast when casting int to string,  to improve 
> multi-thread performance
> -----------------------------------------------------------------------------------------------------
>
>                 Key: IMPALA-10323
>                 URL: https://issues.apache.org/jira/browse/IMPALA-10323
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>    Affects Versions: Impala 3.1.0, Impala 3.2.0, Impala 3.3.0, Impala 3.4.0
>         Environment: 3 nodes ( 24 core, 64 GB mem)
> impala 3.4
>            Reporter: wesleydeng
>            Assignee: wesleydeng
>            Priority: Major
>         Attachments: image-2020-11-12-20-36-50-082.png, 
> image-2020-11-12-20-43-47-010.png
>
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> For float_type, lexical_cast is replace by snprintf (issue 
> https://issues.apache.org/jira/browse/IMPALA-1738),but why not do the same 
> replacement for num_type.
> Test is done in 2 sql case :
> 1)  *group by cast int to string* : 
> select cast(f1 as string) as kk, count ( * ) from test.my_table group by kk;
> 2) *group by* *int :* 
> select f1 as kk, count( *  ) from test.my_table  group by kk;
> !image-2020-11-12-20-43-47-010.png!
> from the benchmark, we can see that performance decreased seriously with more 
> thread.
> But using snprintf, performance improved significantly with more thread .
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to