presto: size worker memory from MemTotal, add worker nofile ulimits, cap drivers per task at 255 #425
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.50) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 393 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.358
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #425"
general
weight: 0.35
patdevinwilson
Host-size problems found while running the harness on larger machines (2.3 TB RAM, 256 cores) with the benchmark automation in knataraj's
benchmarksrepo. All fixes are general, not machine-specific.1.
generate_presto_config.sh: size fromMemTotal, notlsmemRAM_GBcame fromlsmem's online memory, which includes the memory the kernel reserves for itself. pbench turns that intosystem-memory-gb(~98.5%), and Velox'sMmapAllocatormaps that whole amount in one anonymousmmap. Under the default heuristic overcommit (vm.overcommit_memory=0) the kernel refuses a single mapping larger thanMemTotal + SwapTotal, so on a host with no swap and a kernel reservation above the 1.5% headroom the worker aborts at startup:Observed on a 4U 8x RTX PRO 6000 box: lsmem 2306 GiB, MemTotal 2267.2 GiB, requested 2271 GiB. The same gap exists on every host measured (128 vs 125 GiB, 495 vs 482 GiB); smaller hosts survive only when swap or rounding happens to cover it.
Change:
RAM_GBfrom/proc/meminfoMemTotal;PRESTO_MEMORY_GBandPRESTO_NPROCoverride the detected values (useful for benchmark drivers and for reproducing a smaller host). The generation banner says when an override is in effect.2.
docker-compose.native-gpu.yml.jinja:nofileulimit for the workerThe worker's
ulimitssetmemlockandstackbut notnofile; thenofile: 500000that exists sits under the sccache build block and never reaches the runtime container, which therefore runs with Docker's default 1024 descriptors. On the 256-core host the worker dies at startup:Change:
nofile: {soft: 500000, hard: 500000}, the value the sccache build blocks already use.3.
generate_presto_config.sh: captask.max-drivers-per-taskat 255vcpu_per_workerbecomestask.max-drivers-per-task, and a Velox hash join build merges one hash table per driver and supports at most 255 of them. On the 256-core host every hash join failed, base TPC-H Q3 included:Change:
VCPU_PER_WORKERis capped at 255 (GPU workers default to 2 and are unaffected).4.
docker-compose.native-cpu.yml:nofileulimit for the CPU workerSame problem as (2) for the CPU worker, which also ran with Docker's default 1024 descriptors and died at startup on the 256-core host. Change: the same
nofile: {soft: 500000, hard: 500000}.(3) and (4) were split out of #431 (TPC-Havoc), which needed them to run on that host.
Testing
system-memory-gb=2233(< MemTotal) and the worker registers.task.max-drivers-per-task=255, and TPC-H Q3 and Q18 plus their TPC-Havoc variants pass at SF10.system-memory-gb120 -> 118.