---
title: macOS lied about my Docker memory usage
description: The Mac mini dashboard was sizing processes by RSS because macOS denies USS for almost everything, and RSS overstates a VM's real cost.
date: 2026-09-26
tags: macos, performance, debugging
kind: short
---

My Mac mini dashboard's memory breakdown tries USS first, then falls back. Turns out macOS denies USS for 976 of 977 processes, so the whole donut was quietly running on RSS.

The fix: use physical footprint instead, via `proc_pid_rusage` → `ri_phys_footprint`. That's the exact number `top`'s MEM column and Activity Monitor show. Footprint counts compressed pages at full size, so slices can now exceed "used" instead of getting scaled down to fit — when that happens they keep their real size and Other reads 0.

Ollama got its own bug: it was counted as runner footprint *plus* loaded model GPU memory, double-counting since a runner's footprint already holds its model's Metal buffers. Now it's the larger of the two.

On a test instance, the Docker slice read 11.22 GB against a hand-summed 11.23 GB from `top`. Prod had been showing 9.82 GB for the same processes after silently scaling RSS down.

143 tests pass, including a new one just for footprint math.
