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

             Summary: COMPUTE_PROCESSING_COST plans can exceed 
THREAD_RESERVATION_LIMIT and the per-host memory limit
                 Key: IMPALA-15840
                 URL: https://issues.apache.org/jira/browse/IMPALA-15840
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
            Reporter: Zoltán Borók-Nagy


With COMPUTE_PROCESSING_COST=true the planner sizes each fragment from its cost 
and the core count, but never looks at THREAD_RESERVATION_LIMIT (default 3000), 
THREAD_RESERVATION_AGGREGATE_LIMIT or the memory limit. Every fragment instance 
reserves a thread and its minimum buffer reservation, so a query with many 
large fragments can plan more of both per host than the limits allow, and 
admission rejects it, although a plan with fewer instances per node would run. 
The problem grows with the core count.

Example on master, TPC-DS q14_1 at SF10000: the plan reserves 4,769 threads per 
host on 6 executors with 32 vCPU and 9,121 on 3 executors with 64 vCPU, and is 
rejected. With THREAD_RESERVATION_LIMIT=0 it then fails on the minimum memory 
reservation: 108.6 GB per host against mem_limit=80G on the first cluster, 
216.76 GB against 160G on the second. MT_DOP=16 runs the same query in 739 s 
and 792 s.

Could the planner, after computing the effective parallelism, estimate the 
per-host thread and minimum memory reservation and lower the instances per node 
until both fit, down to PROCESSING_COST_MIN_THREADS? Fragments with a fixed 
count, CTE consumers and unpartitioned fragments would keep their count, and a 
union fragment at least the count of each input.



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

Reply via email to