Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> If you use a system-level tool that reports the memory usage of your processes, you should look at the real memory usage.

Things are a bit more complicated than that. Because RSS will contain memory mapped to your process that could also be mapped by other processes. That is the sum of RSS on your machine is also higher than your physical memory.

That includes libraries dynamically linked to your executable, but more importantly shared memory mmapped to your process.

A more "fair" estimate exists in the form of PSS (or USS), that will list all mapped regions from all process, and account each process a proportional share of the region.

e.g. If 2 processes mmap `/dev/shm/foo` of 1GB, both will inherit 500GB by PSS computation.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: