From owner-freebsd-current@FreeBSD.ORG Thu Jan 3 06:15:45 2008 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA24F16A41A; Thu, 3 Jan 2008 06:15:45 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from creme-brulee.marcuscom.com (penna-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id 7139B13C448; Thu, 3 Jan 2008 06:15:45 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.2/8.14.2) with ESMTP id m036GXmS093598; Thu, 3 Jan 2008 01:16:33 -0500 (EST) (envelope-from marcus@FreeBSD.org) From: Joe Marcus Clarke To: Jason Evans In-Reply-To: <477C7CB6.8080701@freebsd.org> References: <1199314166.9913.63.camel@shumai.marcuscom.com> <477C47BC.1020101@freebsd.org> <1199340028.64371.9.camel@shumai.marcuscom.com> <477C7CB6.8080701@freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-iX0YyCDUvry13VmnZCVM" Organization: FreeBSD, Inc. Date: Thu, 03 Jan 2008 01:15:46 -0500 Message-Id: <1199340946.64371.14.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.12.2 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on creme-brulee.marcuscom.com Cc: Robert Watson , current Subject: Re: Memory problem with latest malloc.c 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: Thu, 03 Jan 2008 06:15:45 -0000 --=-iX0YyCDUvry13VmnZCVM Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2008-01-02 at 22:12 -0800, Jason Evans wrote: > Joe Marcus Clarke wrote: > > On Wed, 2008-01-02 at 18:26 -0800, Jason Evans wrote: > >> It would be really helpful to me if you run your program with=20 > >> MALLOC_OPTIONS=3DdM and monitor memory usage. These flags cause mmap = to=20 > >> be used instead of sbrk, and we can find out from that how much memory= =20 > >> you really need. If peak memory usage is substantially different when= =20 > >> using mmap versus sbrk, there's probably a malloc bug. > >=20 > > Memory climbed up to 976 MB SZ, 974 MB RSS MB with dM > > -> /etc/malloc.conf. The file was eventually generated without error. > > Again, with Aj -> /etc/malloc.conf, the python2.5 process operating on > > the same file planed out at 504 MB SZ, 501 MB RSS. >=20 > Okay, that indicates that there is not a problem with malloc; you're=20 > running into the data segment resource limit. It isn't possible to=20 > increase the data segment beyond 512 MB on i386, so your best bet is to=20 > use MALLOC_OPTIONS=3DDM for the memory-intensive program. That will caus= e=20 > the program use all available space in the data segment, then start=20 > using mmap as necessary. Yeah, I just realized that after looking at the memory usage of rev 1.154 (it's the same). I could tweak kern.maxdsiz in loader.conf, but ~ 1 GB is way too much memory for this program. I know what causes the extra memory usage, so I think I'll bug the Evolution guys. Thanks. >=20 > I'm sorta thinking that MALLOC_OPTIONS=3DDM should be the default. Rober= t=20 > Watson is the person who talked me into this change, so feel free to=20 > give him a hard time about the extra configuration you have to do in=20 > order to get work done. =3D) It may not be obvious to all users and I think many will be bit by this (i.e. POLA violation) considering maxdsiz is 512 MB on i386. Having DM the default would be a good idea IMHO. Joe --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-iX0YyCDUvry13VmnZCVM Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBHfH2Sb2iPiv4Uz4cRAs9uAKCQ7JFF+eCVwQ84yOpTYqhA9GRRggCfdpGX VUw9LVEs0fgx6o5gRDDerpc= =CpL4 -----END PGP SIGNATURE----- --=-iX0YyCDUvry13VmnZCVM--