Multi-project iOS teams that run Detox on parallel Mac Mini M4 hosts inherit one coupled budget: iOS Simulator sessions per node, WAN time when derived artifacts fan out, and disk waterline headroom before purple suites flake. This page gives a decision matrix plus a 1TB/2TB acceptance checklist so you can approve cross-region capacity with numbers instead of anecdotes.

Why Detox parallel runs fail before CPU does

Detox is honest about contention: boot storms from concurrent Simulator runtimes inflate APFS metadata IO faster than CPU charts imply. Reusing DerivedData across jobs without a promotion gate yields half-written slices that pass compile yet fail gestures mid-run. On 1TB tiers, CoreSimulator device sets plus Metro or SPM caches collide sooner than leadership expects.

  • Session oversubscription: Treat each Simulator as RAM plus framebuffer plus storage, not “one thread per core.”
  • Artifact races: Two agents writing the same warm cache path without a queue corrupts incremental builds.
  • Disk cliffs: Yellow bands differ between 1TB and 2TB; widen concurrency only when watermarks stay green.

Pair this guide with the Xcode parallel testing and Simulator budget matrix for native xcodebuild lanes, then return here for Detox-specific session math and rsync hygiene.

Concurrency caps

Use the table as the contract between mobile platform, CI, and FinOps. Columns encode what “one more parallel lane” really costs on M4 metal.

Posture Parallel Simulator budget DerivedData stance WAN / region note Disk tier hint
Single-region burst Start two to four concurrent simulators on sixteen GB tiers; validate tail latency before raising caps. Job-scoped directories; never share one DerivedData root between concurrent Detox parents. Keep artifact pulls on LAN; avoid cross-region warm-cache dependency. 1TB viable with weekly cache rotation and hard prune on merge.
Multi-app queue Serialize by app id inside the runner; cap total booted runtimes even if queues wait. Promote read-only snapshots after compile; tests read from frozen trees. If queues spill across regions, add latency budget to Detox startup probes. 2TB when three or more large apps share one host.
Cross-region fan-out Lower per-node concurrency; prefer more M4 nodes over heroic local parallelism. rsync deltas after compile in origin region; consumers verify checksum before boot. Measure RTT and set --bwlimit so transfers never starve Simulator IO. 2TB default when WAN copies and simulators share one APFS volume.

Artifact rsync parameters

Warm caches should arrive atomically from the consumer’s point of view. Stage into a versioned directory, rsync with archive semantics, enable partial files, delay compression until stable links exist, and cap bandwidth on WAN legs so Simulator boot IO keeps priority.

Prefer time or checksum based deltas over blind deletes on shared roots. After transfer, swap a symlink or rename the directory in one operation so Detox never opens a half-populated tree. Deep patterns for this fleet live in the cluster artifacts rsync matrix alongside flock examples.

Tip: Log rsync exit codes with the same correlation id as the Detox session id so flakes read as transport failures instead of “app regression.”

Locks and queues

Give each promotion path a single writer: a merge queue lane, a file lock on the cache root, or a scheduler token from Nomad. Readers may fan out, but writers must serialize or you will chase nondeterministic UI timeouts forever.

Pair CI-level queues with host-level flock around short critical sections that touch shared DerivedData or CoreSimulator device sets. Align escalation with the Nomad affinity and build-lock matrix when multiple services share the same Mac Mini M4.

Scaling strategy

Add nodes when queue depth grows at safe disk waterline, not when someone wants “more parallelism” at ninety percent utilization. Shrink per-node Simulator caps first, then shard apps across hosts, then finance 2TB SKUs.

  1. Instrument per-job APFS free bytes, IO wait, and Detox boot duration percentiles weekly.
  2. Set yellow and red watermarks per tier; fail fast when a job would cross yellow without an approved exception.
  3. Freeze new parallel lanes while hosts sit in red; drain flaky hosts from rotation.
  4. Prefer additional M4 runners in the region where artifacts originate before widening WAN fan-out.
  5. Re-run the matrix after every major iOS runtime upgrade because CoreSimulator storage curves shift.
2–4
Default parallel Simulator sessions to validate on sixteen GB M4 before raising caps.
70%
Plan cache rotation when sustained APFS use crosses seventy percent on 1TB hosts.
80%
Trigger expansion review before eighty percent becomes the weekly median.

1TB/2TB disk waterline acceptance checklist

  • Preflight bytes: Agent publishes free APFS gigabytes; job aborts below the yellow watermark.
  • Simulator cap: Active Detox sessions never exceed the signed matrix row for that SKU.
  • rsync verify: Checksums or strict mtime policy passes before symlink swap to consumers.
  • Lock proof: Promotion events include lock id in structured logs for audit.
  • Prune policy: CoreSimulator and DerivedData retention windows documented and automated.
  • Post-run drain: Failed jobs still release device sets and temp trees within one hour.

Summary: rent parallel Mac M4 that matches Detox reality

Procurement should move with three curves: Detox queue depth, Simulator boot p95, and APFS utilization. When queues grow while disk sits green, add parallel M4 nodes in the right geography. When disk yellows while queues look fine, fix caches and rsync before buying cores.

Browse public plans, read Help for SSH and access patterns, then Purchase extra runners when the checklist stays green under peak Detox load.

Operational guidance only. Tune caps with your own Detox traces and Apple runtime release notes. Watermarks depend on retention, snapshots, and whether other stacks share the same volume.
Parallel iOS capacity

Scale Detox lanes on Mac mini M4

Add dedicated M4 nodes with 1TB or 2TB tiers, keep Simulator budgets explicit, and reuse clustervps regions to place compute beside artifact origin. Related: Xcode parallel testing matrix, cluster rsync matrix, Nomad build locks.

Rent parallel Mac nodes View plans (no login) Help center