<!-- llms-explorer concept facts · https://llms-explorer.com/tree/per-model-memory-measurement-with-footprint-and/ · pack 2026-10-05 · ~977 tokens -->

# Per-model memory measurement with footprint and IOAccelerator

> footprint de-duplicates mlock-wired memory shared between kernel_task and user processes, so per-process sums can differ from system wired memory.

Parent: [Mac local LLMs: Serving ops and multi-model](https://llms-explorer.com/tree/mac-local-llms-serving-ops-and-multi-model/) · 1 facets · 18 facts · page: https://llms-explorer.com/tree/per-model-memory-measurement-with-footprint-and/

## Facts

- footprint de-duplicates mlock-wired memory shared between kernel_task and user processes, so per-process sums can differ from system wired memory. — source: `asserted`
- Clean file-backed memory (an mmapped GGUF) is not Dirty, so it does not add to footprint even when it holds all the weights; it appears as Clean mapped file. — source: `asserted`
- llama.cpp PR 26082 found per-process counters (including footprint) drop after a model is freed while system wired memory stays high, so a Metal leak is visible only system-wide (see llama-cpp-pr-25309 dossier). — source: `asserted`
- footprint must run as root for other users' processes. — source: `asserted`
- Whether MLX weights loaded through make_buffer over mmapped safetensors show as Dirty IOAccelerator or Clean mapped file. — source: `asserted`
- footprint displays all addressable memory but emphasizes memory the kernel counts as dirty for accounting. — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- A process's footprint is equal to the total of all Dirty memory associated with that process. — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- Dirty is memory written to that is neither file-backed nor marked reclaimable; it includes Swapped memory and zero-filled memory. — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- (Wired) is Dirty memory that must stay at a fixed physical location; the man page gives GPU graphics textures placed by the driver as the example. — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- File-backed memory, even if dirty, can be evicted and re-read from disk, and the man page warns a large clean working set can thrash when physical memory is short. — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- Memory from mmap(2) appears as "mapped file" with the path; tagged categories appear as names like "IOKit (graphics)". — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- footprint de-duplicates wired memory between kernel_task and user processes, including memory locked via mlock(2). — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- vmObjectDirty reads dirty memory from kernel VM objects instead of the pmap; it is expensive, cannot run in real time, may not match top or Activity Monitor, and was the default before macOS 10.15. — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- sample secs samples repeatedly (fractional seconds allowed, best effort) and --sample-duration limits it; JSON output gains a samples array. — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- swapped and --wired add the swapped/compressed and wired columns; --json path saves a JSON copy; -p accepts a name or pid. — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- vmmap's DIRTY column excludes the compressed or swapped memory that footprint folds into Dirty. — [source](https://keith.github.io/xcode-man-pages/footprint.1.html)
- footprint --sample 1 -p <pid> with --json gives a time series of a model server's Dirty and (Wired) totals across prefill and unload, which is a repeatable per-model measurement. — source: `asserted`
- For a mmap-loaded GGUF served by llama-server, footprint will undercount the weights relative to RSS because mapped file pages are Clean; use system wired memory (top -l 1 PhysMem) alongside it. — source: `asserted`
