Skip to content

orbit run ignores --core-cache and paths.core_cache for rank-core staging: peer rank cores duplicated into ~/.cache/flare/cores on the controller host #629

Done

Description

@pfn

Environment

2x DGX Spark (GB10, sm_121, 121.6 GiB unified each), direct CX7 RoCE, 2 rails (GID 3, MTU 9000).
flare v0.5.0 controller (orbit run) + agents on both nodes; also reproduced on v0.4.4.
Both agents run with --config whose [paths].core_cache = /home/pfnguyen/flare/cache/cores, and that store already contains the complete TP2 core (both ranks) being served.

Steps

  1. flare --config <cfg> orbit run --name glm53f --transfer-streams 16 (group core points into the configured store).
  2. Sample du -sh ~/.cache/flare/cores (the default root) alongside the controller process's /proc/<pid>/io read_bytes.

Observed

orbit run materializes the entire peer rank-1 core under the default root ~/.cache/flare/cores/<deploy-id>-<rev>/... on the controller (rank-0) host: 101 files, 167.5 GiB, nlink=1, byte-identical to the files already in the configured store (md5 match on layer-018.safetensors).

Falling du of the default root tracks the controller's read_bytes 1:1 while it re-hashes:

elapsed written to default root controller read_bytes
10 s 4.8 GiB 9 GiB
222 s 88.5 GiB 88 GiB
438 s 161.8 GiB 160 GiB
final 167.5 GiB (101/101 files) —

This happened even when both of the following were true at the same time:

  • the controller passed explicit --core-cache /home/pfnguyen/flare/cache/cores
  • every agent carried --config with [paths].core_cache pointing at the same store

i.e. the --core-cache help text's [default: paths.core_cache, else ~/.cache/flare/cores] is not honored for orbit rank-core staging; the write goes to the hard-coded default root regardless.

Asymmetry worth noting: on the receiving node no bytes were written at all (its configured store already held the blobs and dedup applied). Only the controller-side staging wrote a fresh duplicate. Same behavior on v0.4.4.

Side effects seen in the same runs:

  • free disk fell 350 GiB → 14 GiB during back-to-back orbit runs before we noticed and rm -rf'd the duplicate;
  • Distribute rank cores over CX7 took 247.2 s in the run that staged a fresh duplicate vs 2.3–6.1 s when the peer already held the core — the staging read dominates distribution.

Expected

Staging should honor --core-cache / configured core_cache, and skip materializing rank cores the cluster already holds by content digest.

Related

#361 plans to move orbit rank files into the shared model cache (helios/src/core/cache.rs, "designed, not implemented"). This report is the narrower, current-behavior defect: until that lands, staging ignores both the flag and the configured root.

Activity

  1. added
    area:orbit
    bug
    performance
    priority:P2
    triage:investigate
    on Nov 30, 2026
  2. pfn commented on Dec 1, 2026

    @pfn
    Author

    Correction: retracted — the duplicate is NOT gone on main e85019b9.

    My "verified fixed" comment below was checked against the wrong path. #646 moved orbit's peer-rank staging out of ~/.cache/flare (which is why it stayed empty: it now holds only the by-design publishers/ trust JSON) — but the ~168 G duplicate itself still happens, inside the configured core cache, as an orphan deployment-id directory that survives orbit stop:

    ~/flare/cache/cores/models/GLM-5.3-Flash-FP4-Local/
      gb10-tp2-a38922427793462a9b4c65cf247ef4b2-24292110/   # 167.5 GiB
    

    Facts from orbit run --name glm53f (then orbit stop) on the TP2 GB10 pair:

    • 103 files, all with link count 1 — none hardlinked/deduplicated against the blob store, even though a byte-identical rank-1 core for the same version was already resident on the controller host;
    • controller df dropped ~168 G; not reclaimed by orbit stop (group exited cleanly); had to rm -rf the directory manually;
    • net user-visible behavior vs the original report: same +168 G per node per orbit run, just under paths.core_cache now instead of the default root.

    So the --core-cache/[paths].core_cache honoring half of #629 is fixed, but the duplicate-core half is not: distribution materializes a second physical copy where content-addressed dedup against existing blobs was expected. Please reopen (or point me at the intended dedup step so I can check whether our env is skipping it). Happy to rerun with any instrumentation.

  3. pfn commented on Dec 1, 2026

    @pfn
    Author

    Addendum — quantifying the staging cost per orbit run (TP2 GB10 pair, e85019b9).

    Following up on my correction below with exact numbers now that we've audited both nodes:

    • Controller (rank 0 side): full-core staging copy <paths.core_cache>/models/<model>/gb10-tp2-<deployment-id>-<session>/ — 167.5 GiB, 103 files, all link-count 1.
    • Peer (rank 1 side): its rank half staged as <paths.core_cache>/models/<model>/gb10-tp2-<timestamp>/ — 83.7 GiB, byte-identical (sha256-verified) weight blobs that already exist in the same node's content-addressed store. Created while the group was serving, survives orbit stop.
    • Operational wrinkle: on the peer, that staging directory shows up in models list as an ordinary version (own deployments/ dir and everything), so it silently accumulates unless you know the signature of a staging dir. Worth a marker, a gc rule, or cleanup at group exit.
    • Root cause of the missing dedup for anything arriving over the network: the receiver materializes bytes raw (mirror_file path: File::create + set_len + write_all_at) with no content-address pass afterwards — locally-produced installs do go through the blob store and hardlink correctly (our locally-exported version is 100/101 files linked, ~0 exclusive). So locally-installed cores dedupe perfectly; fabric-received staging copies never do. A post-transfer "link if content matches an existing blob, else write" pass would have kept the peer copy at ~0 bytes here.
    • Net per orbit run on this 2-node setup: ~251 GiB of duplicate disk against cores already resident, on both nodes combined, unreclaimed by orbit stop.
  4. pfn commented on Dec 2, 2026

    @pfn
    Author

    Re-tested on v0.5.1 (1fbcc3c9, #667): the peer half is fixed — confirmed on real GB10 hardware; the controller half still leaks exactly as before. Numbered so it's easy to reference:

    1. Peer: fixed. Distributed the rank-1 half (~83.8 GiB over CX7 fabric) to the peer. df used-bytes identical before distribution and after orbit stop (524 GiB), blob store unchanged (181.5 GiB), no new version directory, staging/ empty. The pre-Harden Orbit payload integrity, multi-deployment TP seams, GB10 page-cache release, Unix flock drop, and multi-host peer exports #667 symptom (raw <model>/gb10-tp2-<timestamp>/ rank-half — sha-identical to resident blobs, zero hardlinks, masquerading in models list) is gone. "Zero orphan weight blobs on peer hosts" holds here.

    2. Controller: still broken. orbit run staged the full core a second time under the configured cache: <core_cache>/models/GLM-5.3-Flash-FP4-Local/gb10-tp2-<deployment-id>-<session>/ = 167.53 GiB, 103 files, every one link-count 1, zero blob links, byte-identical to resident blobs (spot-check: rank-1 layer-018 = 3bc389c7… on both sides — the same digest we reported as shared across all versions/nodes in the addendum). It survives orbit stop and appears in models list as an ordinary fourth version under the same deployment id as the real default version, so nothing marks it as garbage. Reclaim needed a registry-aware models remove 'MODEL@<version>' (the layout moved under models/<model>/<version>/ in v0.5.1, so the orphan lands there too).

    Net per orbit run: peer +0 GiB (was +84), controller +167.5 GiB (unchanged). The controller-side copy is pure waste even without content-addressing — the identical payload already exists referenced-by-blob in the same store seconds before staging starts — but content-addressing it, or unlinking it at group exit, would both fix the accounting.

    Side note, same PR: the new envelope-digest binding also behaved correctly here — with a pre-existing peer-side cached unit for this core, the agent re-transferred and re-verified (stored data verified) instead of taking the stale received: 0, verified: false cache hit that motivated that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:orbitbugperformancepriority:P2triage:investigate

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions