HMDeveloper
All articles
local-ai
local-aiollamainfrastructure

Ollama on a Mac: memory lies

Running a local model on a Mac is easy. Knowing how much memory it really uses is not: on October 4 RSS said 15 GB and the physical footprint was over 62 GB.

On October 4, I added the RSS (resident memory, the part currently in RAM) of the model processes on my 48 GB Mac. The total was about 15 GB. That seemed comfortable. Then I checked the physical footprint (memory the system assigns to a process) of the same processes. It was over 62 GB, more than the machine's RAM.

I had been using RSS to measure how heavy my local setup was. Ollama's /api/ps check also showed less memory than the machine was holding. This post explains what runs locally, why it runs there, and how I measure it now.

What runs local and why

I keep models on the Mac only for my assistant's agents: home, personal, the secrets broker, embeddings (number forms of text), and rerank. Heavier text work goes to :cloud tags on Ollama Cloud, which uses the same daemon (server running in the background). The rest does not need my machine's memory. The October 4 measurement shows what that memory costs.

Embeddings are the clearest case. Since June 29, bge-m3 uses vectors (lists of numbers) with 1024 dimensions (number positions). It is the only embedding model used for pgvector tables (a PostgreSQL feature that stores these vectors): agent memories, vault notes, and project chunks. I retired nomic-embed-text. Vectors from different models cannot be compared. Keeping two models meant keeping two vector spaces. Now there is one.

The small model is granite4.1:8b, about 6 GB. It serves the home assistant agent. Rerank chooses which text chunks help most after a search. It runs in PyTorch (a library used for model calculations) and uses MPS (a Mac feature for graphics processor calculations), set with device="mps". Before using the Mac's GPU (graphics processor), the code checks torch.backends.mps.is_available().

Three numbers for the same question

The question was how much memory the models use. Two measures of the same processes, plus the machine's ceiling, all from October 4:

Memory of the model processes, 48 GB Mac

Same processes, two measures. Summed RSS came to about 15 GB; the physical footprint was over 62 GB. The machine has 48 GB of RAM.

Show data
Summed RSS~15 GB
Machine RAM48 GB
Physical footprint>62 GB

Ollama's /api/ps also showed less than the footprint. Both numbers I had to answer "how much is it using" were lower than the memory held by the machine.

On Apple Silicon Macs (Apple processors), memory is unified. The main processor and GPU (graphics processor) use the same memory. Some memory used by a model can sit outside RSS. It may be wired GPU memory (GPU memory kept in RAM) associated with Metal (Apple's graphics technology), compressed memory pages, or swap (disk space used as memory). I did not measure which part took the most. The system assigns the physical footprint to a process. If it is above RAM, some of it may be compressed or in swap. That already says something about the machine before comparing models.

When I need to know how much fits, I read the footprint, not RSS.

Downloaded is not applied

The second optimistic number came on October 16. The Ollama app had downloaded update 0.40.5. After a restart, the server (the program that provides the models) was still on version 0.40.4. The update had downloaded but was not applied.

The server provides the models, so its version is the one that counts. The app's interface shows what was downloaded. To know which version is answering, ask the server.

What stuck

Two rules. For memory, I use process footprint and leave RSS out of capacity estimates. For version, I check /api/version on the server instead of trusting what the app shows.

I only needed these rules after seeing 15 GB on a day when the machine was holding more than 62.

I help teams use AI agents in their everyday software work. If your team is doing that, let's talk.

See consulting