fix(convert-to-dss): size worker pool from cgroup budget, not host CPUs#13
Merged
HenryGeorgist merged 1 commit intoJul 14, 2026
Merged
Conversation
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.
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.
convert-to-dssfell back tomin(len(work), os.cpu_count())whenDSS_WORKERSwas unset. In a container
os.cpu_count()reports the node's CPU count (8), so 8rio.reprojectworkers blew the 12000Mi cgroup and the pod OOMKilled (exit 137),discarding an 18-hour
process-stormscatalog.Route the auto path through
worker_sizing.resolve_num_workers— the samecgroup-derived cap
process-stormsalready uses (honorsnum_workers/CC_NUM_WORKERS).DSS_WORKERSstays as an explicit override.Low risk: unchanged when
DSS_WORKERSis set; 8 workers OOM, so the cgroup countis the feasible max.
resolve_num_workersis covered bytest/test_worker_sizing.py.