Local AI Infrastructure Notes (1/15) — Mac Mini M4 Home Server Architecture: ARM Unified Memory

Hardware selection rationale for local LLM inference, macOS server configuration, and storage separation architecture


Summary

  • The Mac Mini M4's ARM unified memory architecture makes it well-suited for local LLM inference (ollama), with extremely low power draw
  • Running macOS as a server requires explicit configuration of sleep, auto-restart, and update suppression — defaults are not production-safe
  • Routing projects to an external SSD separates OS and working data, enabling independent lifecycle management

Hardware Selection Rationale

The first decision in a home server build is hardware. The options are broad — Raspberry Pi, Intel NUC, repurposed desktop, Synology NAS.

When the primary workload is local LLM inference, the comparison axis shifts.

Running local models via ollama is GPU-memory-bound. On a standard x86 machine, that means a discrete GPU — and 16 GB VRAM cards carry significant cost. The Mac Mini M4 takes a structurally different approach.


ARM Unified Memory Architecture

The defining characteristic of the Mac Mini M4 is its memory architecture.

On a conventional PC, the CPU and GPU operate on independent memory pools (RAM and VRAM). Data transfers between these pools traverse the PCIe bus, and that transfer itself introduces latency.

In ARM unified memory architecture, the CPU, GPU, and Neural Engine all share a single memory pool. On a 16 GB model, the full 16 GB is available to LLM inference — there is no memory-copy overhead. The practical result: 7B–14B parameter models run at usable inference speeds without a discrete GPU.


Power Consumption Comparison

On a 24/7 server, power efficiency is a core operating cost variable.

Device Idle Power Load Power
Mac Mini M4 ~5–7 W ~30–40 W
Intel NUC ~10–15 W ~40–65 W
Standard desktop ~50–80 W 200 W+

Monthly electricity estimate (assuming 15 W average): - 15 W × 24 h × 30 days = 10.8 kWh - Approximate residential cost varies by region and tariff — verify against your specific rate plan


Upfront Cost Structure

Based on the Mac Mini M4 base model (16 GB RAM, 256 GB SSD):

Item Cost
Mac Mini M4 unit ~$550–620 USD (verify at time of purchase)
External SSD (1 TB) ~$70–100 USD (verify at time of purchase)
Total ~$620–720 USD

If a Mac Mini is already on hand, the incremental cost is limited to the external SSD. Against a comparable dedicated server build (Intel NUC + RAM + SSD, new), total cost is similar or lower. Prices shift over time — confirm current pricing before purchase.


macOS Server Configuration Checklist

macOS defaults are tuned for personal workstation use. Sleep mode, automatic updates, and FileVault are enabled by default — none of these are appropriate for always-on server operation. The following must be set explicitly.

Terminal configuration:

sudo pmset -a sleep 0
sudo pmset -a disksleep 0
sudo pmset -a displaysleep 0

sudo pmset -a autorestart 1

sudo pmset -a womp 1

Omitting disksleep causes the external SSD to enter standby independently, resulting in unmount events. sleep and disksleep must always be set together.

System Settings:

  • Enable auto-login: System Settings → Users & Groups → Automatic Login. If the machine stops at the login screen after a restart, services will not come up.
  • Disable automatic software updates: System Settings → General → Software Update → disable automatic updates. macOS can enter a "restart pending" state after a background update, causing unplanned downtime. Apply updates manually at a controlled time.
  • Review FileVault: With FileVault enabled, setting autorestart 1 causes the system to halt at the decryption password prompt after a power loss — unreachable remotely, requiring physical intervention. Evaluate the security vs. operational tradeoff explicitly before deciding.

Storage Separation Architecture

Rather than concentrating everything on the internal SSD, split storage by function.

Separation structure: - Internal SSD: macOS system + system services + ollama model cache - External SSD: all project directories (including git repositories)

Benefits of this structure:

  1. OS–data independence: On macOS reinstall or hardware replacement, transferring the external SSD preserves all project data intact.
  2. Simplified backup: Backup policy scopes to the external SSD as a unit.
  3. Capacity flexibility: A 256 GB or 512 GB internal drive cannot comfortably hold both model files and project files simultaneously. An external SSD removes that ceiling.

Over Thunderbolt 4, external SSD read/write speeds are indistinguishable from internal in practice.


Known Configuration Pitfalls

disksleep omission: Setting pmset sleep 0 without disksleep leaves the disk able to sleep independently, blocking external SSD access. All three values — sleep, disksleep, displaysleep — must be set together.

Unmanaged automatic updates: macOS automatic updates run overnight and can leave the system in a "restart required" state. Services continue running, but the next reboot applies the update and introduces unplanned downtime. Automatic updates must be disabled.

FileVault + autorestart conflict: With FileVault active, autorestart 1 causes the system to halt at the decryption prompt after a power loss. These two settings are mutually exclusive in practice.


Conclusion

Using the Mac Mini M4 as a home server is not a conventional approach. Linux is the standard substrate for server operation, and macOS has default behaviors that are actively inconvenient for always-on use.

The case for this configuration is narrow but clear: when local LLM inference is the core workload and the structural advantage of ARM unified memory is the deciding factor. Power efficiency and general-purpose capability support that decision.

The configuration checklist and storage separation structure documented here address the operational failure modes specific to this setup before they occur.

Series overview: Series index

๋Œ“๊ธ€

์ด ๋ธ”๋กœ๊ทธ์˜ ์ธ๊ธฐ ๊ฒŒ์‹œ๋ฌผ

Agent Memory Engine (2/10) — Building an AI Agent Memory System with SQLite Alone

"ML Foundations (9/9) — PyTorch vs TensorFlow, and the Road to Local LLMs"

"RAG Core Study (14/26) — Evaluation Sets with RAGAS & DeepEval"

"ML Foundations (8/9) — Deep Learning Architectures: CNN, RNN, Attention"

"ML Foundations (7/9) — Deep Learning Training: Optimizers, Regularization, Initialization"

OpenClaw to Hermes Migration (2/13) — What to Preserve, Partially Port, or Discard

AI Agents I Built (5/7) — Building an Automated Blogger API Publishing System