Zoltán Borók-Nagy created IMPALA-15839:
------------------------------------------

             Summary: COMPUTE_PROCESSING_COST does not charge a broadcast join 
for its single-threaded build
                 Key: IMPALA-15839
                 URL: https://issues.apache.org/jira/browse/IMPALA-15839
             Project: IMPALA
          Issue Type: Improvement
          Components: Frontend
            Reporter: Zoltán Borók-Nagy


A shared broadcast join build runs in one thread per node, while the probe 
fragment runs many instances. With MT_DOP > 1 the broadcast vs partitioned 
decision charges the build BROADCAST_TO_PARTITION_FACTOR * sqrt(MT_DOP). 
COMPUTE_PROCESSING_COST plans with MT_DOP unset, so it never pays that penalty, 
although it later plans up to 16 or more probe instances per node, and it 
broadcasts builds of tens of millions of rows. The fewer and bigger the hosts, 
the more joins it broadcasts.

Example on master, TPC-DS SF10000 on 12 executors with 16 cores: q78 broadcasts 
a 1.44G-row build, which each node builds in one thread (295 s for the slowest 
build instance), and q4 broadcasts the 65M-row customer table. In a prototype 
that charges the penalty for the planned probe instances per node, 31 of 
TPC-DS's 1110 joins turn partitioned: q4 223 -> 102 s, q78 417 -> 184 s, q45 
-75%, q85 -27%; q10 +44% (1.4 s), because two runtime filters then arrive after 
their scans. On 3 executors with 64 vCPU, TPC-H SF1000 takes 362.9 s against 
212.0 s on 6 executors with 32 vCPU (same total vCPUs): q3 and q7 switch a join 
to BROADCAST (build estimated at 150M and 46M rows, actual 334M and 146M), and 
the one-thread build takes 34 s and 23 s per host (q3 45.9 vs 12.3 s, q7 27.9 
vs 5.9 s).

Could COMPUTE_PROCESSING_COST apply the MT_DOP broadcast penalty with the 
instances per node that the probe fragment can get, without truncating the 
factor (IMPALA-15672)?



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to