Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Nov 1995 22:24:48 -0500
From:      Paul Fox <pgf@American.COM>
To:        freebsd-questions@freebsd.org
Subject:   what's counted in RSS and VSZ?
Message-ID:  <199511030324.WAA05749@mozart.american.com>

next in thread | raw e-mail | index | archive | help

hi -- can someone tell me about the "resident set" and "virtual" sizes
as reported by ps?  (i'm running 2.0.5, btw.)  i'm trying to figure
whether and how shared stuff, like shared libs and shared memory regions,
are included in those numbers.  i built a simple program, and linked it
statically and dynamically:
	cc -o simple.dynamic simple.c
	cc -static -o simple.static simple.c

here are the results:

USER       PID %CPU %MEM   VSZ  RSS TT  STAT STARTED       TIME COMMAND
pgf       8369  0.0  2.3   136  324 p3  S    10:21PM    0:00.04 simple.dynamic
pgf       8370  0.0  0.4   164   48 p3  S    10:21PM    0:00.01 simple.static

questions:

    - how can RSS ever be bigger than VSZ?  

    - why are the VSZ numbers for the two different builds different?

    - how did:
		main()
		{
			int i = 60;
			while(i--) sleep(1);
		}
       get to be so damn big?  :-)

    - where would this be documented, if indeed it is documented at
	all?  (i'm not complaining if it isn't -- i'm mainly curious
	about where to look for this kind of info.)

---------------------
    paul fox				american internet corporation 		
    pgf@american.com
    (home: pgf@foxharp.boston.ma.us)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511030324.WAA05749>