As I understand, on Linux the output of /proc/(pid)/status gives you the following numbers, which add up to the "VmRSS" (resident set size):
VmRSS: 11060 kB
RssAnon: 4644 kB
RssFile: 6416 kB
RssShmem: 0 kB
The man page for proc has:
* RssAnon: Size of resident anonymous memory. (since Linux 4.5).
* RssFile: Size of resident file mappings. (since Linux 4.5).
* RssShmem: Size of resident shared memory (includes System V shared memory, mappings
from tmpfs(5), and shared anonymous mappings). (since Linux 4.5).
I'm still a little unclear what these numbers correspond to. Some questions:
- What is "anonymous memory?"
- What is a "resident file mapping?"
- Which of these are backed by physical RAM - all of them? I understand RssFile is referring to memory mapped files - is it the size of the mapped files on the filesystem, or a cost in RAM?