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
Share:
9,796

Related videos on Youtube

Cees
Author by

Cees

Updated on September 18, 2022

Comments

  • Cees
    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
      Admin about 12 years
      and the output is?..
  • Cees
    Cees about 12 years
    Thanks for the great answer. Any idea how %mem is related to rss and sz/vsz?
  • beginer
    beginer over 9 years
    @Mat perfect answer, also a great question Mr. abc.