Mathematical connection between SZ RSS and VSZ in ps o/p?
9,796
sz
and vsz
represent the same thing, but sz
is in page units, while vsz
is in 1024 byte units.
To get your system's page size, you can use:
$ getconf PAGE_SIZE
4096
rss
is the subset of the process's memory that is currently loaded in RAM (in kilobytes). This is necessarily smaller than vsz
.
So the "mathematical" connections are:
vsz * 1024 = sz * page_size
rss <= vsz
Related videos on Youtube
Author by
Cees
Updated on September 18, 2022Comments
-
Cees over 1 year
I wanted to know what mathematical connection is there between the SZ, RSS and VSZ output in ps output e.g.
ps -p 2363 -o sz,rss,vsz
-
Admin about 12 yearsand the output is?..
-
-
Cees about 12 yearsThanks for the great answer. Any idea how %mem is related to rss and sz/vsz?
-
beginer over 9 years@Mat perfect answer, also a great question Mr. abc.