From owner-freebsd-hackers Sat Nov 16 19: 1:49 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4AA5937B401 for ; Sat, 16 Nov 2002 19:01:48 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4039F43E42 for ; Sat, 16 Nov 2002 19:01:47 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id gAH31ipk006541; Sat, 16 Nov 2002 20:01:44 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sat, 16 Nov 2002 20:01:26 -0700 (MST) Message-Id: <20021116.200126.81091323.imp@bsdimp.com> To: dillon@apollo.backplane.com Cc: hackers@FreeBSD.ORG Subject: Re: cvs commit: src/bin/sleep sleep.c From: "M. Warner Losh" In-Reply-To: <200211170158.gAH1wJhc035731@apollo.backplane.com> References: <200211152017.gAFKHbFS044142@apollo.backplane.com> <20021116.174331.28768088.imp@bsdimp.com> <200211170158.gAH1wJhc035731@apollo.backplane.com> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <200211170158.gAH1wJhc035731@apollo.backplane.com> Matthew Dillon writes: : Take /bin/csh (aka tcsh) for example. : : Startup overhead if static: 144 pages faults, 113 zero fill, 64 COW : Startup overhead if dynamic: 310 page faults, 131 zero fill, 84 COW : : So the difference is 38 pages of memory = 152KB per instance. : That's fairly significant on a multi-user system that might have : several hundred csh's running. I specifically compile certain : non-forked binaries on my system static precisely to reduce their : memory footprint. I just ran a quick test on my systems here. It looks like two identical systems give results that are approximately: VSZ RSS dynamic: root 79054 1.3 2.5 1952 1524 pa S 2:56AM 0:00.13 tcsh static: root 38788 0.0 0.1 1324 908 pi S 7:53PM 0:00.03 tcsh which actually is a little more than the numbers that you quoted above (this is 4.5-release + a couple of tweaks). These were run 3 minutes apart on machines in different timezone and were for just the login case. So it does look like there's more of a penalty for this than I would have otherwise expected. I don't know how much of the VSZ is shared with other processes in the dynamic case. When I run tcsh, I see a reduction by 592k of memory fre that vmstat reports in the dynamic case and a 532k reduction in that same parameter in the static case, so maybe someting is exagerating the difference between the two in the ps stats. Or maybe something else ran on the static system (since it is used for other things)... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message