From owner-freebsd-current@FreeBSD.ORG Fri Feb 17 01:34:29 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 218CD16A420; Fri, 17 Feb 2006 01:34:29 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id D366B43D48; Fri, 17 Feb 2006 01:34:28 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id B608F1A4D82; Thu, 16 Feb 2006 17:34:28 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 19D91512D9; Thu, 16 Feb 2006 20:34:28 -0500 (EST) Date: Thu, 16 Feb 2006 20:34:28 -0500 From: Kris Kennaway To: Dmitry Pryanishnikov Message-ID: <20060217013427.GB31540@xor.obsecurity.org> References: <20060215024339.N22450@atlantis.atlantis.dp.ua> <43F29BF5.4060300@freebsd.org> <20060216140725.T23429@atlantis.atlantis.dp.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+pHx0qQiF2pBVqBT" Content-Disposition: inline In-Reply-To: <20060216140725.T23429@atlantis.atlantis.dp.ua> User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@freebsd.org, David Xu Subject: Re: Virtual memory consumption (both user and kernel) in modern CURRENT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2006 01:34:29 -0000 --+pHx0qQiF2pBVqBT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 16, 2006 at 02:15:55PM +0200, Dmitry Pryanishnikov wrote: > Without putchar() call my program's virtual address space isn't so big: >=20 > PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND > 52126 root 1 127 0 1244K 440K RUN 0:31 43.97% a.out >=20 > But with putchar() it gives us >=20 > PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND > 58959 root 1 130 0 50100K 632K RUN 0:03 47.19% a.out >=20 > What't the reason of so terrible virtual memory consumption? I don't beli= eve > that just plain stdio buffering requires 50 Mbytes (!) of virtual address > space. Note that only 200K of extra memory is used. Using 50MB of virtual address space is not going to cause any problems unless the pages are touched, which as you can see from the resident size, they aren't. See also the old "omg, rpc.statd has as size of 256MB" entry in the FAQ. Kris --+pHx0qQiF2pBVqBT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD9SgjWry0BWjoQKURAmlTAKCjPABSYZyHnDdJnTKx8XuMIrY5awCgooM6 I40VAteQ3mvn22JYNxbls1U= =y1Ns -----END PGP SIGNATURE----- --+pHx0qQiF2pBVqBT--