feat(presto/bench): NUMA-aware Presto worker config generation - #391
Draft
misiugodfrey wants to merge 1 commit into
Draft
feat(presto/bench): NUMA-aware Presto worker config generation#391misiugodfrey wants to merge 1 commit into
misiugodfrey wants to merge 1 commit into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Based on kjmph's bench33 POC patch. Rewrites generate_presto_config.sh to discover host NUMA topology and size each worker to its share of the NUMA node(s) it's bound to, rather than dividing the full host uniformly. - discover_cpu_numa_topology / cpu_numa_node_for_worker helpers in common_functions.sh using lscpu, lsmem, and /proc/meminfo fallbacks - CPU_WORKERS_PER_HOST controls how many workers to spread per host - Per-worker CPU thread and RAM limits derived from the smallest NUMA node share assigned anywhere on the host (homogeneous sizing) - CPU_NUMA_WORKER_LAYOUT exported for downstream consumers - set_or_append_property helper for idempotent config file mutations - cuDF exchange guard restricted to GPU-only (was incorrectly gating CPU configurations)
misiugodfrey
force-pushed
the
misiug/bench-numa-config
branch
from
July 28, 2026 16:03
5eb4e2e to
dcfa364
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rewrites
generate_presto_config.shto discover host NUMA topology at config-generation time and size each worker to its proportional share of the NUMA node(s) it will be bound to. Previously all workers on a host received identical configs sized to the full host, which over-allocated CPU and memory for multi-worker-per-host CPU runs.Based on kjmph's bench33 POC patch.
discover_cpu_numa_topology(new helper incommon_functions.sh): useslscpu,lsmem, and/proc/meminfofallbacks to enumerate CPU NUMA nodes, their logical CPU counts, and their memory in GB; distinguishes CPU-hosting nodes from HBM-only memory nodes (relevant for Grace-Hopper hosts)cpu_numa_node_for_worker(new helper): maps a worker slot index to its NUMA node using balanced contiguous placement (yields 0; 0,1; 0,0,1,1 for 1/2/4 workers on a 2-socket host)count_linux_cpu_list(new helper): parses LinuxCpus_allowed_list-style range strings (e.g.0-47,96-143) to a countgenerate_presto_config.sh: NUMA topology discovery runs whenUSE_NUMA=1; per-worker CPU thread and RAM limits derived from the smallest NUMA node share;CPU_NUMA_WORKER_LAYOUTexported as<node>:<count>map for downstream consumers;set_or_append_propertyhelper for idempotent property file mutations; cuDF exchange guard restricted to GPU-only (was incorrectly gating CPU runs)Dependencies
Depends on PR #390 (
bench-fixes-tuning) for thecommon_functions.shjq→python3 fix inwait_for_worker_node_registration. Rebase after PR #390 merges.Verification
CPU_WORKERS_PER_HOST=2andUSE_NUMA=1, verifygenerate_presto_config.shproduces two configs with CPU count = (total logical CPUs on one socket / 2) and RAM = (HBM on that socket / 2)USE_NUMA=0, verify the generated config is unchanged from the pre-patch behavior (full-host sizing, single worker)CPU_NUMA_WORKER_LAYOUTis set correctly (e.g.0:1,1:1for 2 workers on a 2-socket host)discover_cpu_numa_topologycorrectly ignores HBM-only NUMA nodes as CPU-hosting nodes on Grace-Hopper (nodes withCPU_NUMA_NODE_CPU_COUNTS[i] == 0should not contribute CPU slots)set_or_append_propertyis idempotent: runninggenerate_presto_config.shtwice does not duplicate property entries./ci/check_style.shon changed files