Re: [SLUG] SIZE vs RSS in top(1)

From: Andrew M Hoerter (amh@pobox.com)
Date: Sun Sep 14 2003 - 19:22:52 EDT


On Sun, 14 Sep 2003, btt wrote:

> What is the difference between the SIZE and the RSS of a process? I've
> read the man page for top(1), but would really like to hear an
> in-depth, technical explanation.

The basic difference is that SIZE represents the total address space size
of a process, while RSS is the actual physical memory currently occupied
by pages belonging to that process (roughly speaking). Regions of an
address space mapped to something don't necessarily occupy any RAM.

To give a real-world example: under Solaris (and probably other OS'es),
the X11 server usually maps memory on the framebuffer into its address
space. Since that mapping can be quite large, people new to Solaris often
think that some strange process "Xsun" has a memory leak because of its
large SIZE value in ps/top output. In reality, the mapping occupies no
RAM and doesn't affect the "real" memory usage of the process at all.

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 20:38:31 EDT