title: Should i look at VmSize, VmRSS, or some combination for memory stats on linux?
body: <p>I am trying to calculate appropriate sizing data on a linux system for a product and am looking to determine memory usage.  The way I am approaching it so far is by running: </p>
  
  <pre>cat /proc/&lt;pid&gt;/status</pre>
  
  <p>When looking at the output, but I am not sure which figures are relevant.  For example:</p>
  
  <pre>
  VmPeak: 19662464 kB
  VmSize: 18344416 kB
  VmLck:         0 kB
  VmHWM:   5942980 kB
  VmRSS:   4734832 kB
  VmData:  2108608 kB
  VmStk:       120 kB
  VmExe:      9256 kB
  VmLib:    304448 kB
  VmPTE:     10316 kB
  </pre>
  
  <p>I would think i would use VmSize (Virtual Memory right?) or VmRSS (Private Memory right?) or some combination to determine this, but I am not sure.  Any pointers on correctly calculating the memory usage of a process in Linux?</p>