Per-model memory measurement with footprint and IOAccelerator
Parent: Mac local LLMs: Serving ops and multi-model · Published reference · snapshot 2026-10-05
↓ Facts as markdownall context files
footprint de-duplicates mlock-wired memory shared between kernel_task and user processes, so per-process sums can differ from system wired memory.
These notes link each claim to its source. A source may be a research report hosted on this site rather than the primary document. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
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]
- 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]
- 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]
- footprint must run as root for other users' processes. [source]
- Whether MLX weights loaded through make_buffer over mmapped safetensors show as Dirty IOAccelerator or Clean mapped file. [source]
- footprint displays all addressable memory but emphasizes memory the kernel counts as dirty for accounting. [source]
- A process's footprint is equal to the total of all Dirty memory associated with that process. [source]
- Dirty is memory written to that is neither file-backed nor marked reclaimable; it includes Swapped memory and zero-filled memory. [source]
- (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]
- 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]
- Memory from mmap(2) appears as "mapped file" with the path; tagged categories appear as names like "IOKit (graphics)". [source]
- footprint de-duplicates wired memory between kernel_task and user processes, including memory locked via mlock(2). [source]
- 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]
- sample secs samples repeatedly (fractional seconds allowed, best effort) and --sample-duration limits it; JSON output gains a samples array. [source]
- swapped and --wired add the swapped/compressed and wired columns; --json path saves a JSON copy; -p accepts a name or pid. [source]
- vmmap's DIRTY column excludes the compressed or swapped memory that footprint folds into Dirty. [source]
- 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]
- 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]
Children
- No children recorded.