I am trying to figure out how the PSS is calculated is Android.
I found one article that states the following.
The “proportional set size” (PSS) of a process is the count of pages
it has in memory, where each page is divided by the number of
processes sharing it. So if a process has 1000 pages all to itself,
and 1000 shared with one other process, its PSS will be 1500
My first question is, is the above information accurate ? If not, could someone tell me how it is really calculated ?
Also, is this value is kilobytes or is “PSS” a unit by itself ?
Yes, that information is accurate, and that’s exactly how it is calculated. (The LWN.net article is here; note that Matt Mackall who participates in that thread you link to developed that feature.)
PSS is in kilobytes, like all the other information you get in
/proc/<pid>/smaps. Its unit follows from how it is calculated.(How often is PSS value updated for a given process in /proc/pid/smaps has some pointers as to where and how PSS is calculated – disclaimer: I wrote the answer there. There are a few other posts on Unix & Linux that discuss PSS and related metrics.)