From owner-freebsd-current@FreeBSD.ORG Fri Feb 17 01:30:41 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 0967916A420; Fri, 17 Feb 2006 01:30:41 +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 ADD4A43D49; Fri, 17 Feb 2006 01:30:40 +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 8F8931A4D8B; Thu, 16 Feb 2006 17:30:40 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id E5179512D9; Thu, 16 Feb 2006 20:30:39 -0500 (EST) Date: Thu, 16 Feb 2006 20:30:39 -0500 From: Kris Kennaway To: Mike Jakubik Message-ID: <20060217013039.GA31540@xor.obsecurity.org> References: <20060215024339.N22450@atlantis.atlantis.dp.ua> <43F29BF5.4060300@freebsd.org> <20060216123548.GA35910@uk.tiscali.com> <20060216135138.GA16669@flame.pc> <43F525A6.3080701@rogers.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IJpNTDwzlM2Ie8A6" Content-Disposition: inline In-Reply-To: <43F525A6.3080701@rogers.com> User-Agent: Mutt/1.4.2.1i Cc: Giorgos Keramidas , Dmitry Pryanishnikov , freebsd-current@freebsd.org, David Xu , Brian Candler 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:30:41 -0000 --IJpNTDwzlM2Ie8A6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 16, 2006 at 08:23:50PM -0500, Mike Jakubik wrote: > Giorgos Keramidas wrote: > >On 2006-02-16 12:35, Brian Candler wrote: > > =20 > >>On Wed, Feb 15, 2006 at 11:11:49AM +0800, David Xu wrote: > >> =20 > >>>>1) Is it normal that virtual memory size for almost every non-kernel > >>>>process > >>>> is close to 50Mb now: > >>>> > >>>> ftp://external.atlantis.dp.ua/FreeBSD/CURRENT/top.txt > >>>> > >>>> Is it miscalculation or real growth of virtual address space? > >>>> =20 > >>>I believe this is the new malloc code in libc, I am seeing this on my > >>>Athlon64 machine, now it likes swap memory, in the old days, it seldom > >>>touched it. > >>> =20 > >>IIRR, the new malloc grabs 32MB immediately. However, I'd hope that=20 > >>doesn't > >>mean that 32MB of pages are actually touched, and then get swapped out = to > >>disk. If it does, I'm staying on FreeBSD 6.0 :-) > >> =20 > > > >I don't think so. > > > >At least, not unless you are using the debugging features of malloc(), > >which can result in all pages getting touched (i.e. if the "J" option is > >enabled, to set all newly-allocated bytes to 0xa5, which is very helpful > >when trying to catch accesses to uninitialized pointers). > > > >It's all a matter of what you are prepared to trade-off and why, I guess= :) > > =20 >=20 > And what am i trading off here? I have "/etc/malloc.conf@ -> ajz" and my= =20 > memory usage has gone up the roof. My system used to be swap free, and=20 > now its swapping over 40 MB. Can someone explain to me why this new=20 > malloc is better? I don't see any speed improvements. It's a couple of orders of magnitude faster for threaded binaries. See earlier posts by the author for extensive discussion. Kris --IJpNTDwzlM2Ie8A6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD9Sc/Wry0BWjoQKURArmJAKCVdnYJlrp/U1ZduzJlPsirHP34uACgr7AA F4c3rDDm4AqWkMxqQ4QL8rg= =HDly -----END PGP SIGNATURE----- --IJpNTDwzlM2Ie8A6--