Timeline for Understanding VIRT, RES and SHR in htop
Current License: CC BY-SA 4.0
Post Revisions
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| 8 hours ago | answer | added | Peter Cordes | timeline score: 0 | |
| 11 hours ago | comment | added | Glenn Willen |
I have come to appreciate USS (effectively "nonshared resident") and PSS (effectively "nonshared resident, plus shared divided by number of sharing processes"). However, these apparently rely on something called "smaps", which is expensive to compute and requires root to see stats across users. And while my top has them, I don't know what htop has. (There is a corresponding RSS that is "RES computed from smaps", but given the limitations it seems much less useful than RES.)
|
|
| 13 hours ago | comment | added | Stephen Kitt |
@user3728501 you might get some of SHR back (if the process is the only user of a shared memory mapping, it will be freed when the process exits); but SHR is similar to VIRT, it reflects mappings rather than actual physical use.
|
|
| yesterday | history | became hot network question | |||
| yesterday | comment | added | user3728501 |
@GiacomoCatenazzi Ah, ok I see that's the use case/context for it. RES = you will get this much physical memory back. VIRT = says nothing about how much memory (physical or swap space) you will get back, SHR = says something about the amount you definitely won't get back from VIRT
|
|
| yesterday | comment | added | Giacomo Catenazzi | SHR is separate, because it gives you an idea: if you kill the process, you are not probably freeing the shared part (because it is used also by other processes). | |
| yesterday | answer | added | Stephen Kitt | timeline score: 7 | |
| yesterday | history | asked | user3728501 | CC BY-SA 4.0 |