8GB Mac mini OpenClaw Guide: Memory Compression, Swap & Unified Memory for Local ULM (2026)
You bought the entry Mac mini—8 GB or 16 GB unified memory—and want OpenClaw running 24/7 as a home-lab gateway with a local on-device model (ULM) on the side. Linux VPS guides tell you to free -h and edit swappiness; on Apple Silicon, the interesting knobs are memory compression, APFS swap files, and how GPU + CPU + Neural Engine share one RAM pool.
This guide is for Apple-ecosystem tinkerers—not datacenter admins. You will read Activity Monitor like a dashboard, cap OpenClaw Node concurrency, and pick quantized model sizes that fit without silent swap storms.
Why 8 GB Mac mini feels “full” with OpenClaw
OpenClaw is not one process—it is a Node gateway, optional MCP child processes, browser automation, and sometimes a local inference server (MLX, Ollama, llama.cpp). On unified memory:
| Layer | Typical RSS (idle → busy) | Notes |
|---|---|---|
| macOS + WindowServer (headless still has services) | 2.5–4 GB | Higher if GUI logged in |
| OpenClaw gateway (Node) | 400 MB–1.2 GB | Grows with session history |
| Each MCP stdio server | 50–300 MB each | Filesystem + GitHub stacks add up |
| Local 7B Q4 ULM (MLX/Ollama) | 4.5–6 GB | Dominates on 8 GB hosts |
| Browser tool session | 500 MB–2 GB | WebKit is the hidden tax |
Quotable definition: On Apple Silicon, unified memory means the GPU loading model weights and the Node gateway serving HTTP share the same physical RAM—there is no discrete VRAM escape hatch like on many Linux GPU boxes.
That is why an 8 GB mini can look fine in top until a local ULM loads—then compressed memory climbs and swap used ticks up. See OpenClaw install on Mac mini for baseline setup before tuning.
Unified memory: M1 through M4 budget table
| Chip / RAM tier | Realistic OpenClaw + cloud API only | OpenClaw + small local ULM | Recommendation |
|---|---|---|---|
| M1/M2 8 GB | ✓ gateway + 1–2 MCP | ⚠ 3B–4B quant only | Cloud-primary; ULM for summaries only |
| M2/M3 16 GB | ✓ comfortable | ✓ 7B Q4 single session | Sweet spot for home server |
| M4 16 GB | ✓ + light browser tools | ✓ 7B Q4, avoid parallel ULM + browser | Cap maxConcurrentTasks at 2 |
| M4 24 GB+ | ✓ staging + prod | ✓ 7B–8B + gateway headroom | See local MLX routing |
External reference: Apple Mac mini technical specifications for official memory options.
Scenario A — 8 GB home gateway (cloud models only)
Run OpenClaw against API providers; skip local 7B. Reserve ≥ 3 GB free before enabling filesystem + GitHub MCP together. Set maxConcurrentTasks: 1 in gateway config and serialize browser tools.
If X, do Y: If compressed memory stays above 2 GB at idle, disable browser toolsets until you upgrade RAM or move ULM to another machine.
Scenario B — 16 GB with local ULM sidecar
Load one quantized model (e.g. 7B Q4 ≈ 4.5 GB). Schedule ULM jobs when OpenClaw is not running heavy browser automation. Pair with concurrency caps—memory and API limits fail together.
Activity Monitor: the five columns that matter
Open Activity Monitor → Memory tab:
- Memory Pressure — green/yellow/red; yellow means start killing MCP servers
- App Memory — Node/OpenClaw row; watch step jumps after long sessions
- Compressed — macOS compressing inactive pages; sustained growth = RAM deficit
- Swap Used — APFS-backed swap; > 2 GB on 8 GB host = actionable
- Cached Files — reclaimable; do not confuse with “free RAM” on Apple stats
CLI equivalent for SSH headless boxes:
memory_pressure
vm_stat | egrep 'Pages (free|active|inactive|speculative|wired|compressed|swap)'
sysctl hw.memsize
Log a snapshot every 5 minutes during soak tests; correlate with OpenClaw JSONL timestamps.
Swap and memory compression (macOS, not Linux)
macOS manages swap automatically via dynamic swap files on APFS. You generally do not disable compression—it is how Apple stretches 8 GB. Instead:
- Reduce demand — smaller quant, fewer MCP servers, shorter context windows
- Stagger workloads — do not warm-load ULM during peak OpenClaw cron
- Watch swapins —
vm_statfieldPageins/Swapinsaccelerating = thrashing
For launchd-level guardrails (ulimit, plist wrappers), add resource limits guide—this article covers hardware budgeting; that one covers process ceilings.
OpenClaw config: cap Node workers and MCP fan-out
Example gateway excerpt (YAML/JSON varies by version—adjust keys to your openclaw.json):
gateway:
maxConcurrentTasks: 1 # 8 GB: start at 1; 16 GB: 2
taskTimeoutMs: 120000
agents:
maxParallelToolCalls: 2 # lower on 8 GB
mcp:
maxServers: 2 # filesystem + one optional
Node heap ceiling (LaunchAgent EnvironmentVariables):
<key>EnvironmentVariables</key>
<dict>
<key>NODE_OPTIONS</key>
<string>--max-old-space-size=1024</string>
</dict>
On 16 GB, --max-old-space-size=2048 is a common ceiling; on 8 GB, keep 1024 or lower to leave room for MCP + ULM.
Seven-step runbook: stable OpenClaw on low-RAM Mac mini
Step 1 — Baseline memory snapshot at idle
After reboot, before starting OpenClaw:
vm_stat | head -12
Record Pages free and Compressed totals.
Step 2 — Start gateway alone; verify pressure stays green
openclaw gateway start # or launchctl kickstart your plist label
Wait 10 minutes; Memory Pressure should stay green on 16 GB cloud-only configs.
Step 3 — Add MCP servers one at a time
Enable filesystem MCP, observe +200–400 MB. Add GitHub MCP only if pressure allows.
Step 4 — Set concurrency before loading ULM
Apply maxConcurrentTasks: 1 (8 GB) or 2 (16 GB). Confirm with a synthetic two-task queue—second task should wait, not fork duplicate browsers.
Step 5 — Warm-load local ULM during quiet window
# Example: Ollama pull + run small model
ollama pull qwen2.5:3b-instruct-q4_K_M
ollama run qwen2.5:3b-instruct-q4_K_M "Reply OK"
If swap used jumps > 1 GB within 60 seconds on 8 GB, downgrade quant or move ULM off-host.
Step 6 — Enable periodic memory logging
Cron or LaunchAgent running:
/usr/bin/logger -t openclaw-mem "$(memory_pressure 2>&1 | head -1)"
Step 7 — Document rollback thresholds
If compressed > 3 GB (8 GB host) or swap > 2 GB: unload ULM, set maxConcurrentTasks: 1, restart gateway.
Troubleshooting
Symptom: OpenClaw “hangs” but CPU is low
Pattern: Memory Pressure red, swap climbing, fan quiet.
Fix: Kill browser MCP sessions; restart gateway; reduce maxParallelToolCalls; check for orphan Node processes (pgrep -fl openclaw).
Symptom: Local ULM was fast, then 10× slower
Pattern: vm_stat shows rising Compressor pages.
Fix: Pause OpenClaw browser tools; unload model; on 8 GB only run ULM or OpenClaw, not both at peak.
Symptom: JavaScript heap out of memory in gateway logs
Pattern: Long chat sessions + large tool outputs.
Fix: Lower NODE_OPTIONS heap only after trimming tool output limits; truncate JSONL sessions; see resource limits article for plist env wiring.
Recommended path by RAM tier
| Your RAM | Do this |
|---|---|
| 8 GB | Cloud APIs primary; maxConcurrentTasks: 1; max 2 MCP; 3B–4B ULM only off-peak |
| 16 GB | 7B Q4 ULM + OpenClaw with concurrency 2; Activity Monitor weekly |
| 24 GB+ | Hybrid MLX routing; still cap browsers; monitor swap anyway |
FAQ
Related reading: 2026 AI Coding Compute Guide: Cursor vs Copilot vs Claude Code
Need a headless gateway host?
A dedicated Mac mini can run OpenClaw 24/7 as a cloud-connected gateway while you tune memory on your desk machine.