osdc/hf-cache: per-tier rclone --buffer-size (CPU 0, gpu1 2M) - #917
Merged
Conversation
huydhn
force-pushed
the
hf-cache-buffer-size-2m
branch
from
July 17, 2026 17:19
418d12e to
abbf25e
Compare
huydhn
force-pushed
the
hf-cache-buffer-size-2m
branch
from
July 17, 2026 17:22
abbf25e to
a257b56
Compare
Contributor
|
do we know that --buffer-size is the culprit here? If it was, it should have been fixed when we lowered to 4MiB, correct? |
Contributor
Author
There is no single culprit, as both memory limit and the size of of nodes are involved. Lower buffer size does help reduce the memory footprint, but in a bigger node with multiple pods, it's not enough. 4MB is not low enough for CPU nodes that only has 256MB granted to rclone. That's why you see OOM crash concentrated on CPU nodes, not GPU ones which allocate more memory to rclone |
Contributor
|
yaeah, but the question is that this knob is substantial or marginal. But maybe worth releasing any way. |
jeanschmidt
approved these changes
Jul 17, 2026
huydhn
force-pushed
the
hf-cache-buffer-size-2m
branch
from
July 18, 2026 00:32
a257b56 to
66df31b
Compare
huydhn
force-pushed
the
hf-cache-buffer-size-2m
branch
4 times, most recently
from
July 18, 2026 09:05
273e10a to
fe71d5f
Compare
…to 640Mi CPU-tier (r7i/m7i) rclone OOMs persist at buffer 0 AND at 512Mi (both clusters OOM'd again at ~14:00 and ~18:00 under load), because the OOM is rclone heap/vfs-item/ dir-cache overhead, not read-ahead. Raise CPU catch-all 256->640Mi and gpu1 512->640Mi (GOMEMLIMIT ~576MiB). 640Mi is the safe ceiling: 1Gi strands the tight nodes (c7i.metal-24xl/r7a.12xlarge for CPU, a10g/l4/t4 8xl for gpu1) per analyze_node_utilization; at 640Mi all fit (c7i.metal 328Mi / r7a.12xl 331Mi / g4dn.8xl 168Mi free). Residual peak-load OOMs still possible -> pair with pytorch#876 self-heal.
huydhn
force-pushed
the
hf-cache-buffer-size-2m
branch
from
July 18, 2026 18:16
fe71d5f to
81f7a8d
Compare
huydhn
added a commit
to huydhn/pytorch-ci-infra
that referenced
this pull request
Jul 18, 2026
…#917) pytorch#917 raised the CPU catch-all and 1-GPU reserves to 640Mi in deploy.sh but the smoke test's MOUNT_TIERS still asserted 256Mi/512Mi, failing 'deploy-fast / Smoke tests'. Sync the smoke-test expectations to deploy.sh.
huydhn
added a commit
to huydhn/pytorch-ci-infra
that referenced
this pull request
Jul 18, 2026
…#917) pytorch#917 raised the CPU catch-all and 1-GPU reserves to 640Mi in deploy.sh but the smoke test's MOUNT_TIERS still asserted 256Mi/512Mi, failing 'deploy-fast / Smoke tests'. Sync the smoke-test expectations to deploy.sh.
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.
Makes rclone
--buffer-sizea per-tier value indeploy.shinstead of one global flag. Read-ahead RAM scales as (concurrent open shards) × buffer-size, and peak concurrency scales with a node's pod density, so the tight small tiers need less read-ahead:--buffer-size 0(read-ahead off; served from the--vfs-cache-mode fullon-disk cache).--buffer-size 2M(a single HF model opening ~100+ shards at 4M overruns the 512Mi reserve; observed OOMs on g5.16xlarge gpu1 nodes).--buffer-size 4M(roomier reserve, keep more prefetch).Addresses the OOM driver on both small tiers via buffer sizing. Note this is buffer-size only; the deeper fix (mount reserve sized to pod density) can follow, and #876 adds self-heal so any residual OOM recovers instead of wedging.