Skip to content

osdc/hf-cache: run the mount on GPU nodes only - #884

Draft
huydhn wants to merge 2 commits into
pytorch:mainfrom
huydhn:hf-cache-gpu-only
Draft

osdc/hf-cache: run the mount on GPU nodes only#884
huydhn wants to merge 2 commits into
pytorch:mainfrom
huydhn:hf-cache-gpu-only

Conversation

@huydhn

@huydhn huydhn commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What

CPU runners don't pull models, so the per-node hf-cache rclone mount is wasted on CPU nodes. Restrict the mount DaemonSet to GPU nodes via a nvidia.com/gpu: "true" nodeSelector.

Rebased onto current main (on top of #883's per-GPU-count tiers + #889); GPU-only is expressed purely via the nodeSelector, tier sizes unchanged.

Changes

  • mount-daemonset.yaml.tpl: add nvidia.com/gpu: "true" nodeSelector.
  • Startup-taint gate (required): gate node-init.osdc.io/hf-cache to GPU nodepools (applies_when: d.get("gpu")) — with the DS GPU-only, a CPU node would otherwise be tainted with nothing to clear it and never schedule runner pods.
  • Packing: flip the templated hf-cache overhead to gpu_only=True so it's no longer reserved on CPU nodes.

The CPU job-pod /mnt/hf_cache bind-mount stays (cluster-wide hf_cache_enabled); harmless because the hostPath is type: DirectoryOrCreate — with no rclone DS on the node, kubelet just creates an empty read-only dir.

daemonset_overhead.py (hf-cache now GPU-only)

hf-cache-mount: 100m CPU, 256Mi RAM [GPU-only]
Total (all nodes): 360m CPU, 902Mi RAM
Total (GPU nodes): 560m CPU, 1414Mi RAM

CPU nodes no longer reserve the hf-cache 256Mi; no runner regressed to 0 pods.

Deploy

Redeploy hf-cache + arc-runners (+arc-runners-opt). Drain so nodes recycle onto the GPU-gated nodepool taint.

Independent of #890; overlapping lines in deploy.sh/daemonset_overhead.py merge trivially.

huydhn added 2 commits July 9, 2026 15:55
CPU runners don't pull models, so the per-node hf-cache rclone mount is wasted
on CPU nodes. Restrict the mount DaemonSet to GPU nodes via a `nvidia.com/gpu:
"true"` nodeSelector.

Shipped with the startup-taint gate (required): the `node-init.osdc.io/hf-cache`
taint is emitted on runner nodepools and was cleared by the mount DS running
everywhere. With the DS now GPU-only, gate the taint to GPU nodepools
(`applies_when: d.get("gpu")`) — otherwise CPU nodes would be tainted with
nothing to clear it and never schedule runner pods (same pattern cache-enforcer
uses for release-runner pools).

Packing: the templated hf-cache overhead flips to `gpu_only=True`, so
`analyze_node_utilization` no longer reserves it on CPU nodes.

Job-pod `/mnt/hf_cache` mount on CPU runners is left as-is (harmless empty
read-only dir via hostPath DirectoryOrCreate; `hf_cache_enabled` is cluster-wide).
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.

1 participant