Yida Wu has uploaded this change for review. ( https://gerrit.cloudera.org/25286
Change subject: IMPALA-15586: Auto tune cores for COMPUTE_PROCESSING_COST ...................................................................... IMPALA-15586: Auto tune cores for COMPUTE_PROCESSING_COST With COMPUTE_PROCESSING_COST=true, the default group has no cores per executor bound, and named group sets use pool limits. Queries can then be planned for more cores than the executors can use under CPU affinity, cgroup CPU limits or admission slots. This adds --auto_tune_compute_processing_cost (default false). For queries with COMPUTE_PROCESSING_COST=true, it caps the cores per executor using the effective cores that backends report: - Default group: the effective cores of its smallest executor. Admission control does not check admission slots for it. - Other group sets: min(effective cores, admission slots) of the smallest executor in their healthy groups. - Not tuned: only coordinators request pools, and groups with an executor that does not report its cores like in a mixed-version cluster. The cluster membership manager sends the cap to the frontend as TExecutorGroupSet.min_executor_cores. Cores are never raised. MAX_FRAGMENT_INSTANCES_PER_NODE and PROCESSING_COST_MIN_THREADS still take precedence, and pool limits such as MAX_MT_DOP still apply as before. This also fixes a division by zero in the available cores per node for only coordinators request pools, which have no executors. Testing: - Added ComputeProcessingCostAutoTuneTest, which plans TPC-DS queries with the 3TB stats for the default group and for other executor group sets, with and without the flag. Its tests fail if the tuning is disabled. - Added AutoTuneComputeProcessingCostTest for the Frontend helpers, including only coordinators request pools. - Added BE tests for EffectiveCores(), PlannableCores() and the cores in PopulateExecutorMembershipRequest(). - Added custom cluster tests to test_executor_groups.py for a group set limited by admission slots, executors joining and leaving it, and the default group with --num_cores. - TPC-DS (92 queries) on executors limited to 4 cores: without the flag, 2 queries fail in the default group and 13 are rejected in a pool without a CPU limit. With the flag, all pass, with equal or lower single-stream times. Change-Id: If886b88347070b952dd49713fa80d162004f3d28 Assisted-by: Claude Opus 5.5 (Claude Code) --- M be/src/scheduling/cluster-membership-mgr-test.cc M be/src/scheduling/cluster-membership-mgr.cc M be/src/scheduling/cluster-membership-mgr.h M be/src/util/backend-gflag-util.cc M common/thrift/BackendGflags.thrift M common/thrift/Frontend.thrift M fe/src/main/java/org/apache/impala/service/BackendConfig.java M fe/src/main/java/org/apache/impala/service/Frontend.java A fe/src/test/java/org/apache/impala/planner/ComputeProcessingCostAutoTuneTest.java A fe/src/test/java/org/apache/impala/service/AutoTuneComputeProcessingCostTest.java M tests/custom_cluster/test_executor_groups.py 11 files changed, 727 insertions(+), 20 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/86/25286/2 -- To view, visit https://gerrit.cloudera.org/25286 To unsubscribe, visit https://gerrit.cloudera.org/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: If886b88347070b952dd49713fa80d162004f3d28 Gerrit-Change-Number: 25286 Gerrit-PatchSet: 2 Gerrit-Owner: Yida Wu <[email protected]>
