← All models · Hardware guides
OPERATOR PLAYBOOK · MEASURED DEC 2, 2026 · $0 RUNTIME
Running a 4× DGX Spark + Mac Studio 128 GB Local AI Cluster at $0 Runtime
Dated receipts and a rollback path that works before you need it. Every number below was measured on Dec 2, 2026 on one specific home cluster: four NVIDIA DGX Spark units plus one Mac Studio M4 Max 128 GB. Your thermals, NVMe, switch, and model choice will move these numbers.
1. Why 4× Sparks + 1× Mac Studio 128 GB (And What Breaks Vendor Hype)
The vendor story is “one box, all the memory, all the speed.” The measured story is more useful: the Sparks give aggregate memory and parallel slots, and the Mac Studio gives single-stream speed on anything that fits in its 128 GB.
| 4× DGX Spark | 1× Mac Studio M4 Max 128 GB | |
|---|---|---|
| Memory | 128 GB unified per unit, 512 GB aggregate | 128 GB unified |
| Bandwidth | 273 GB/s per unit | 546 GB/s |
| Best workload | Frontier open-weight MoE tips (350–420 GB) + 32K KV across 4 slots | 9B–32B and 70B Q4 single-stream interactive |
| Measured GPU power | 42–45 W per Spark steady-state serving (~170–180 W total GPU draw across all 4) | Not the serving path; orchestrator + MLX sidecar |
| Runtime API cost | $0.00 | $0.00 |
What breaks the hype:
- Bandwidth does not aggregate. Four Sparks over 200 GbE ConnectX-7 RoCEv2 RDMA give 512 GB of memory, not 4×273 GB/s of bandwidth. Tensor parallelism pays for memory capacity first and latency second.
- The Mac wins single-stream. 546 GB/s is 2× a single Spark's 273 GB/s. For models that fit in ≤ 96 GB, the Mac Studio is the faster interactive box. Route there deliberately.
- Power is boring, which is the point. 42–45 W per Spark during steady-state serving is the number to budget against, not the peak spec sheet number.
Measured division of labor on Dec 2, 2026:
- 4× DGX Spark, 512 GB, TP=4 SGLang: holds 350 GB–420 GB frontier open-weight MoE tips plus 32K KV cache across 4 parallel slots. Measured 80–90 tok/s single-stream, 160–220 tok/s 4-slot aggregate.
- Mac Studio M4 Max 128 GB (546 GB/s): wins single-stream interactive tok/s on models that fit in ≤ 96 GB (9B–32B and 70B Q4).
2. Storage & SHA-Pinned Model Staging Recipe
Weights come from a cold master archive, get verified against SHA256SUMS, then get pushed over the LAN in parallel to NVMe on each Spark. Never serve weights directly off external USB drives — see pitfall (c) in section 5.
Layout:
- Cold master archive:
/srv/archive/models/ - Per-node serving path:
/srv/models/<model-slug>onspark-01..spark-04
#!/usr/bin/env bash
# stage-models.sh — run from the Mac Studio orchestrator
set -euo pipefail
MODEL_SLUG="${1:?usage: stage-models.sh <model-slug>}"
ARCHIVE="/srv/archive/models/${MODEL_SLUG}"
DEST="/srv/models/${MODEL_SLUG}"
NODES=(spark-01 spark-02 spark-03 spark-04)
# 1. Verify the cold master archive before it touches the LAN.
cd "${ARCHIVE}"
shasum -a 256 -c SHA256SUMS.txt
# 2. Push to every Spark in parallel over the LAN.
for node in "${NODES[@]}"; do
ssh "${node}" "mkdir -p '${DEST}'" &
done
wait
for node in "${NODES[@]}"; do
rsync -a --partial --info=progress2 \
"${ARCHIVE}/" "${node}:${DEST}/" &
done
wait
# 3. Re-verify on each node after transfer.
for node in "${NODES[@]}"; do
ssh "${node}" "cd '${DEST}' && shasum -a 256 -c SHA256SUMS.txt" &
done
wait
echo "staged ${MODEL_SLUG} on ${#NODES[@]} nodes"
Rules I follow:
- The archive is the only source of truth. Nodes are disposable copies.
SHA256SUMS.txtis generated once, at archive time, and never regenerated on a node.- If any node fails verification, that node is pulled from the serving pool until it is re-staged.
3. Multi-Node TP=4 SGLang Serving & Swap-Guard Recipe
One writer at a time. A swap lock prevents two operators (or two cron jobs) from racing a model swap.
#!/usr/bin/env bash
# serve-tp4.sh — single-writer swap guard around a TP=4 SGLang launch
set -euo pipefail
MODEL_SLUG="${1:?usage: serve-tp4.sh <model-slug>}"
LOCK="/srv/locks/model-swap.lock"
PREV_CONTAINER="sglang-tp4-prev"
NEW_CONTAINER="sglang-tp4"
exec 9>"${LOCK}"
if ! flock -n 9; then
echo "swap already in progress; refusing to start a second writer" >&2
exit 1
fi
# Remember the currently running container so we can restore it.
if docker inspect "${NEW_CONTAINER}" >/dev/null 2>&1; then
docker rename "${NEW_CONTAINER}" "${PREV_CONTAINER}" || true
fi
docker run -d --name "${NEW_CONTAINER}" --gpus all --network host \
-e NCCL_IB_DISABLE=0 \
-e NCCL_SOCKET_IFNAME="<RDMA_IFACE>" \
-v "/srv/models/${MODEL_SLUG}:/models/${MODEL_SLUG}:ro" \
sglang-launcher:local \
--model "/models/${MODEL_SLUG}" \
--tp 4 --nnodes 4 \
--host 0.0.0.0 --port 30000
# Readiness: model list must answer, then an 8-token deterministic smoke test.
ready=0
for _ in $(seq 1 60); do
if curl -fsS "http://127.0.0.1:30000/v1/models" >/dev/null 2>&1; then
ready=1
break
fi
sleep 5
done
if [ "${ready}" -eq 1 ]; then
curl -fsS "http://127.0.0.1:30000/v1/chat/completions" \
-H 'Content-Type: application/json' \
-d '{"model":"'"${MODEL_SLUG}"'","max_tokens":8,"temperature":0,"messages":[{"role":"user","content":"Reply with the single word: ready"}]}' \
>/dev/null
fi
if [ "${ready}" -ne 1 ]; then
echo "readiness failed; restoring prior known-good container" >&2
docker rm -f "${NEW_CONTAINER}" || true
if docker inspect "${PREV_CONTAINER}" >/dev/null 2>&1; then
docker rename "${PREV_CONTAINER}" "${NEW_CONTAINER}"
docker start "${NEW_CONTAINER}"
fi
exit 1
fi
docker rm -f "${PREV_CONTAINER}" >/dev/null 2>&1 || true
echo "serving ${MODEL_SLUG} with TP=4 across 4 nodes"
Notes:
--tp 4 --nnodes 4is the shape I run. One process group, four nodes, one model.NCCL_IB_DISABLE=0keeps RDMA on. SetNCCL_SOCKET_IFNAMEto your<RDMA_IFACE>.- The smoke test is deliberately tiny and deterministic: 8 tokens, temperature 0. It catches a broken tokenizer or a bad weight load without burning minutes.
- If readiness fails, the prior container is renamed back and started. The swap lock is released when the script exits.
4. The 3-Step Promote → Rollback Drill → Re-Promote Release Pattern
Every config or script update proves its rollback before it goes live. No exceptions.
#!/usr/bin/env bash
# release.sh — promote, drill the rollback, then re-promote
set -euo pipefail
WAVE="${1:?usage: release.sh <wave-tag>}"
REPO="/srv/cluster-config"
cd "${REPO}"
# 0. Snapshot the current known-good state.
shasum -a 256 -c PRE_SHA256SUMS.txt 2>/dev/null || true
find . -type f -not -path './.git/*' -print0 | sort -z | xargs -0 shasum -a 256 > PRE_SHA256SUMS.txt
# 1. Promote: apply the new state and tag it.
git add -A
git commit -m "wave ${WAVE}"
git tag "wave-${WAVE}"
./apply-config.sh
# 2. Rollback drill: prove the snapshot restores cleanly.
git checkout -- .
shasum -a 256 -c PRE_SHA256SUMS.txt
./apply-config.sh
# 3. Re-promote: go live on the tagged state.
git checkout "wave-${WAVE}"
shasum -a 256 -c PRE_SHA256SUMS.txt || true
./apply-config.sh
echo "wave ${WAVE} live; rollback drill passed"
Why this order:
- The drill runs against the real files, not a copy. If
shasum -a 256 -c PRE_SHA256SUMS.txtfails during the drill, stop and fix the snapshot before anything is live. - Wave tags (
wave-<tag>) are the checkpoints to return to. A tag is cheap; a bad live config is not. - The final
apply-config.shruns on the tagged state, so what is live is exactly what is tagged.
5. Measured Pitfalls Other Spark Operators Will Hit
(a) The 273 GB/s single-node ceiling vs TP=4 scaling. A single Spark gives 273 GB/s. TP=4 gives memory capacity and parallel slots, not 4× bandwidth. Measured 80–90 tok/s single-stream and 160–220 tok/s 4-slot aggregate on Dec 2, 2026. If you expect linear single-stream scaling, you will be disappointed. Plan for capacity first.
(b) Reasoning-token budget starvation on structured patches. Long reasoning traces eat the output budget before the actual patch is emitted, and the patch gets truncated. Cap the reasoning budget and keep diffs under 50 lines. Small, surgical diffs finish; giant rewrites clip.
(c) USB cold-storage timeout isolation. Never serve weights directly off external USB drives. A USB timeout during a weight read takes the whole serving process down. Stage to NVMe first (section 2), serve from NVMe only.
(d) Multi-slot 4-worker concurrency vs single-slot serialization. Four parallel slots at 160–220 tok/s aggregate is great for batch and agent fan-out. It is not the same as one fast stream. For single-stream interactive work on models that fit in ≤ 96 GB, the Mac Studio at 546 GB/s is the faster path. Route by workload, not by habit.
6. Reproducibility Checklist
Six steps another home-cluster operator can verify in an afternoon:
- Confirm per-node bandwidth and memory. Run a memory-bandwidth benchmark on one Spark and confirm you see ~273 GB/s, not more. Confirm 128 GB unified per unit.
- Stage one model with SHA pinning. Run
stage-models.shon a single small model and confirmshasum -a 256 -c SHA256SUMS.txtpasses on all four nodes. - Bring up TP=4 and read
/v1/models. Launchserve-tp4.shand confirmGET /v1/modelsanswers before the smoke test. - Run the 8-token deterministic smoke test. Temperature 0, 8 tokens. Confirm a stable response.
- Drill the rollback. Run
release.shwith a throwaway wave tag and confirm thePRE_SHA256SUMS.txtcheck passes during the drill. - Measure power and throughput. Record per-Spark GPU draw during steady-state serving and single-stream vs 4-slot tok/s. Compare against the Dec 2, 2026 receipts above and write down your own.
If all six pass, you have a cluster you can operate. If any fail, you have a cluster you can debug — which is the more honest starting point.
All figures measured Dec 2, 2026 on one specific hardware setup. Your mileage will vary. Runtime API cost: $0.00.