Tim Armstrong has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16202


Change subject: IMPALA-9956: inline hot functions in Sorter
......................................................................

IMPALA-9956: inline hot functions in Sorter

Add some compiler hints to force inlining of small
functions into the hot Partition() loop.

Performance:
A single node perf run on TPC-H showed no perf change.

A single node performance run with the queries that target
sort performance showed up to a 19% reduction in time spent
in the sort.

+-------------------+-----------------------+---------+------------+------------+----------------+
| Workload          | File Format           | Avg (s) | Delta(Avg) | GeoMean(s) 
| Delta(GeoMean) |
+-------------------+-----------------------+---------+------------+------------+----------------+
| TARGETED-PERF(30) | parquet / none / none | 5.52    | -5.82%     | 4.00       
| -9.74%         |
+-------------------+-----------------------+---------+------------+------------+----------------+

+-------------------+-------------------------------------+-----------------------+--------+-------------+------------+-----------+----------------+-------+----------------+---------+--------+
| Workload          | Query                               | File Format         
  | Avg(s) | Base Avg(s) | Delta(Avg) | StdDev(%) | Base StdDev(%) | Iters | 
Median Diff(%) | MW Zval | Tval   |
+-------------------+-------------------------------------+-----------------------+--------+-------------+------------+-----------+----------------+-------+----------------+---------+--------+
| TARGETED-PERF(30) | primitive_orderby_all               | parquet / none / 
none | 11.89  | 12.22       |   -2.73%   |   1.07%   |   1.20%        | 10    | 
  -2.88%       | -3.13   | -5.42  |
| TARGETED-PERF(30) | primitive_orderby_bigint_expression | parquet / none / 
none | 2.61   | 2.94        | I -11.27%  |   0.83%   |   1.14%        | 10    | 
I -12.56%      | -3.58   | -26.25 |
| TARGETED-PERF(30) | primitive_orderby_bigint            | parquet / none / 
none | 2.06   | 2.42        | I -14.80%  |   0.94%   |   0.68%        | 10    | 
I -17.43%      | -3.58   | -44.37 |
+-------------------+-------------------------------------+-----------------------+--------+-------------+------------+-----------+----------------+-------+----------------+---------+--------+

(I) Improvement: TARGETED-PERF(30) primitive_orderby_bigint_expression [parquet 
/ none / none] (2.94s -> 2.61s [-11.27%])
+---------------------+------------+----------+----------+------------+-----------+----------+----------+------------+--------+-------+-------+-----------+
| Operator            | % of Query | Avg      | Base Avg | Delta(Avg) | 
StdDev(%) | Max      | Base Max | Delta(Max) | #Hosts | #Inst | #Rows | Est 
#Rows |
+---------------------+------------+----------+----------+------------+-----------+----------+----------+------------+--------+-------+-------+-----------+
| 02:ANALYTIC         | 11.84%     | 332.95ms | 337.56ms | -1.37%     |   4.86% 
  | 360.86ms | 379.52ms | -4.92%     | 1      | 1     | 5.09M | 18.00M    |
| F00:EXCHANGE SENDER | 15.61%     | 439.03ms | 454.63ms | -3.43%     |   4.86% 
  | 478.29ms | 485.79ms | -1.55%     | 1      | 1     | -1    | -1        |
| 01:SORT             | 67.05%     | 1.89s    | 2.21s    | -14.88%    |   0.98% 
  | 1.92s    | 2.26s    | -15.07%    | 1      | 1     | 5.09M | 18.00M    |
+---------------------+------------+----------+----------+------------+-----------+----------+----------+------------+--------+-------+-------+-----------+

(I) Improvement: TARGETED-PERF(30) primitive_orderby_bigint [parquet / none / 
none] (2.42s -> 2.06s [-14.80%])
+---------------------+------------+----------+----------+------------+-----------+----------+----------+------------+--------+-------+-------+-----------+
| Operator            | % of Query | Avg      | Base Avg | Delta(Avg) | 
StdDev(%) | Max      | Base Max | Delta(Max) | #Hosts | #Inst | #Rows | Est 
#Rows |
+---------------------+------------+----------+----------+------------+-----------+----------+----------+------------+--------+-------+-------+-----------+
| 02:ANALYTIC         | 15.39%     | 367.90ms | 373.26ms | -1.44%     |   3.48% 
  | 390.03ms | 393.01ms | -0.76%     | 1      | 1     | 5.09M | 18.00M    |
| F00:EXCHANGE SENDER | 15.64%     | 373.88ms | 374.12ms | -0.07%     |   2.83% 
  | 389.96ms | 386.36ms | +0.93%     | 1      | 1     | -1    | -1        |
| 01:SORT             | 56.28%     | 1.35s    | 1.68s    | -20.10%    |   1.14% 
  | 1.38s    | 1.70s    | -18.92%    | 1      | 1     | 5.09M | 18.00M    |
| 00:SCAN HDFS        | 9.67%      | 231.18ms | 231.77ms | -0.25%     |   7.06% 
  | 247.79ms | 250.70ms | -1.16%     | 1      | 1     | 5.09M | 18.00M    |
+---------------------+------------+----------+----------+------------+-----------+----------+----------+------------+--------+-------+-------+-----------+

Change-Id: I7a8034ab6d2e3c71a2d2f2fcc3d6b788e9398194
---
M be/src/runtime/sorter-internal.h
M be/src/runtime/sorter-ir.cc
2 files changed, 13 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/02/16202/1
--
To view, visit http://gerrit.cloudera.org:8080/16202
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a8034ab6d2e3c71a2d2f2fcc3d6b788e9398194
Gerrit-Change-Number: 16202
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Armstrong <[email protected]>

Reply via email to