Upon boot up why is there usage in Inactive and Page In for memory

memory

Activity Monitor memory screen shot

I understand the concept behind the various memory usage, but I don't understand why there are Inactive memory and Page In upon boot up. There are no applications that have started which hasn't quit, and what was in RAM that was written to HD that is being brought back as shown in Page In?

Best Answer

The Inactive memory is probably the result of the boot process itself. Any of the files the boot process used, and then no longer needed are still cached for retrieval until something else needs the space.

I believe the page-outs have to do with the way OS X handles loading of dynamically linked libraries and files. Say you load an app called ReallyComplexApplication. This may point to a number of different libraries of code, but don't all need to be loaded into RAM when the app first loads. So OS X loads the core program into memory, and sets up RAM in such a way that if ReallyComplexApplication tries to grab code or data from BigLibraryOfCode it is automatically loaded from disk to memory.

That would be a page in. The OS expects data to be in RAM, but it isn't really there. This isn't really a problem, per say, because it is designed that way. But it is still considered a "page fault"

[EDIT] Source: https://developer.apple.com/library/mac/documentation/Performance/Conceptual/ManagingMemory/Articles/AboutMemory.html

In that article they actually differentiate, so what you're probably seeing is what they call "Soft fault."

On my machine that has been up for 2 days, I have 16GB of RAM, 0 page-outs but 22,288,514 page ins.