Skip to content

fix(convert-to-dss): size worker pool from cgroup budget, not host CPUs#13

Merged
HenryGeorgist merged 1 commit into
USACE-Cloud-Compute:mainfrom
nghiemv:fix/dss-worker-sizing
Jul 14, 2026
Merged

fix(convert-to-dss): size worker pool from cgroup budget, not host CPUs#13
HenryGeorgist merged 1 commit into
USACE-Cloud-Compute:mainfrom
nghiemv:fix/dss-worker-sizing

Conversation

@nghiemv

@nghiemv nghiemv commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

convert-to-dss fell back to min(len(work), os.cpu_count()) when DSS_WORKERS
was unset. In a container os.cpu_count() reports the node's CPU count (8), so 8
rio.reproject workers blew the 12000Mi cgroup and the pod OOMKilled (exit 137),
discarding an 18-hour process-storms catalog.

Route the auto path through worker_sizing.resolve_num_workers — the same
cgroup-derived cap process-storms already uses (honors num_workers /
CC_NUM_WORKERS). DSS_WORKERS stays as an explicit override.

Low risk: unchanged when DSS_WORKERS is set; 8 workers OOM, so the cgroup count
is the feasible max. resolve_num_workers is covered by test/test_worker_sizing.py.

convert-to-dss fell back to min(len(work), os.cpu_count()) when DSS_WORKERS
was unset. Inside a container os.cpu_count() reports the node's CPU count
(8), not a memory-aware number, so eight concurrent rio.reproject workers
(72-hr AORC -> SHG 4 km) exceeded the 12000Mi cgroup within seconds and the
pod was OOMKilled (exit 137), discarding an 18-hour process-storms catalog.

Route the auto path through worker_sizing.resolve_num_workers instead -- the
same cgroup-derived cap process-storms already trusts (PER_WORKER_MB budget,
plus num_workers / CC_NUM_WORKERS overrides). Neither stage can now silently
scale to host-CPU count. DSS_WORKERS stays as an explicit override.
@HenryGeorgist
HenryGeorgist merged commit 5b46268 into USACE-Cloud-Compute:main Jul 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants