From owner-freebsd-questions Thu Nov 2 19:25:25 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA07558 for questions-outgoing; Thu, 2 Nov 1995 19:25:25 -0800 Received: from mozart.american.com (mozart.american.com [204.253.96.2]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id TAA07551 for ; Thu, 2 Nov 1995 19:25:20 -0800 Received: from localhost (localhost [127.0.0.1]) by mozart.american.com (8.6.12/8.6.9) with SMTP id WAA05749 for ; Thu, 2 Nov 1995 22:24:48 -0500 Message-Id: <199511030324.WAA05749@mozart.american.com> X-Authentication-Warning: mozart.american.com: Host localhost didn't use HELO protocol To: freebsd-questions@freebsd.org Subject: what's counted in RSS and VSZ? Reply-to: pgf@American.COM Date: Thu, 02 Nov 1995 22:24:48 -0500 From: Paul Fox Sender: owner-questions@freebsd.org Precedence: bulk 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)