Zoltan Borok-Nagy has uploaded this change for review. ( https://gerrit.cloudera.org/25575
Change subject: PROTOTYPE IMPALA-15840: Fit CPC parallelism into thread reservation limits ...................................................................... PROTOTYPE IMPALA-15840: Fit CPC parallelism into thread reservation limits With COMPUTE_PROCESSING_COST=true the planner picks the instance count of each fragment without looking at THREAD_RESERVATION_LIMIT or THREAD_RESERVATION_AGGREGATE_LIMIT. Every instance reserves a thread, so a plan with many large fragments can reserve more threads per host than the limit (3000 by default), and admission control rejects it. Queries with many fragments on hosts with many cores hit this, e.g. a large rollup query planned at 16 instances per node. After the effective parallelism is computed, the planner now estimates the thread reservation per host and in total, the same way as computeResourceReqs(). If it exceeds either limit, it lowers the number of instances that a fragment may run per node, one at a time down to PROCESSING_COST_MIN_THREADS, until the plan fits. Only fragments above that cap are lowered. Fragments with a fixed count, CTE consumers, unpartitioned and smaller fragments keep their count, partitioned join builds follow their parent, and a union fragment keeps at least the count of each of its inputs, which the scheduler requires. The minimum memory reservation is not checked yet. This is the first of a series of COMPUTE_PROCESSING_COST (CPC) costing prototypes. The last one (IMPALA-15841) has the measured effect of the series. Testing: - New ProcessingCostDefaultGroupCoresTest case plans TPC-DS with low limits; unpatched, 16 of the plans exceed them. - New planner test of TPC-DS q43 with THREAD_RESERVATION_LIMIT=10, and a Calcite test of a union of CTE consumers with a low limit. - Ran the CPC planner test suites. Change-Id: I5000bfdc0cc114f43c8a2c7f9a7afba8431140d5 Assisted-by: Claude Opus 5.5 (Claude Code) --- M fe/src/main/java/org/apache/impala/planner/PlanFragment.java M fe/src/main/java/org/apache/impala/planner/Planner.java M fe/src/test/java/org/apache/impala/planner/ProcessingCostDefaultGroupCoresTest.java M fe/src/test/java/org/apache/impala/planner/TpcdsCpuCostPlannerTest.java A java/calcite-planner/src/test/java/org/apache/impala/calcite/planner/CteThreadReservationLimitTest.java A testdata/workloads/functional-planner/queries/PlannerTest/tpcds_cpu_cost/tpcds-q43-thread-reservation-limit.test 6 files changed, 520 insertions(+), 11 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/75/25575/1 -- To view, visit https://gerrit.cloudera.org/25575 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5000bfdc0cc114f43c8a2c7f9a7afba8431140d5 Gerrit-Change-Number: 25575 Gerrit-PatchSet: 1 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
