Turning a quiet M4 Mac mini (16GB) into an always-on local LLM and automation node takes more than leaving the power cable plugged in. Without deliberate sleep assertions, slot scheduling, and memory hygiene, overnight batches stall silently.
1. Scope Sleep Control with caffeinate
- Wrap your always-on
llama-serverwithcaffeinate -s(blocks system sleep on AC power). - Wrap scheduled batch scripts with
caffeinate -i(blocks idle sleep only while running). - Verify active assertions anytime with
pmset -g.
2. Stagger launchd Schedules Around -np 1
Unlike traditional cron, Apple launchd (StartCalendarInterval) catches up missed runs after wake. When sharing a single-slot inference server (--host 127.0.0.1 --port 8080 -np 1), stagger jobs (e.g., 06:30, 08:10, 12:10, 20:10) so two batches never contend for the same 16GB window and port.
3. Cut Resident Heap by 90.1% and Watch Logs
Passing --no-webui --no-slots --cache-ram 0 reduced Dirty Malloc Large heap from 2,374 MB to 236 MB (-90.1%) in our M4 benchmarks. Pair that with explicit StandardOutPath / StandardErrorPath log rotation and periodic SQLite WAL checkpoints.
4. Accept FileVault & Public Endpoint Boundaries
If FileVault disk encryption is enabled, unexpected power cuts or macOS updates pause at the unlock screen until manual login. Keep public webhooks and Git mirrors on a lightweight VPS and treat your home Mac mini as a private compute node behind surge protection or a compact UPS.
Read the complete guide and plist templates on SiliconBench:
