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

From: btt (btt@nethouse.com)
Date: Mon Sep 15 2003 - 06:17:09 EDT


On Sun, Sep 14, 2003 at 07:22:52PM -0400, Andrew M Hoerter wrote:
> 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.

I see... so does this also include functions in shared libraries? Like
if libc.so is already in memory for another process, then do all other
processes that use libc share the memory addresses of the various
functions in libc? And are the sizes of the shared functions included
in a processes SIZE? Or is the whole libc's size included? Does that
even make sense? :p

> 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.

Yeah, I have a mysql process that's using like 81,000 SIZE, but like
6,000 RSS.
-----------------------------------------------------------------------
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:40:47 EDT