Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Dec 2012 07:52:35 +1100
From:      Peter Jeremy <peter@rulingia.com>
To:        "Matthew D. Fuller" <fullermd@over-yonder.net>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r242102 - in head: contrib/bmake usr.bin/bmake
Message-ID:  <20121130205235.GA84363@server.rulingia.com>
In-Reply-To: <20121115084121.GI66994@over-yonder.net>
References:  <201210252318.q9PNI6IQ069461@svn.freebsd.org> <20121114172823.GA20127@dragon.NUXI.org> <20121114184837.GA73505@kib.kiev.ua> <CADLo83_TQ0213jeo16J5X=vdKVbbYPq=WN2HZJCLkKMCP=RkFA@mail.gmail.com> <20121115151622.J1179@besplex.bde.org> <20121115084121.GI66994@over-yonder.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--VS++wcV0S1rZb1Fb
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

[A bit delayed]

On 2012-Nov-15 02:41:22 -0600, "Matthew D. Fuller" <fullermd@over-yonder.ne=
t> wrote:
>On Thu, Nov 15, 2012 at 06:07:27PM +1100 I heard the voice of
>Bruce Evans, and lo! it spake thus:
>>=20
>> Maybe malloc() would be faster with MALLOC_PRODUCTION.  I use
>> /etc/malloc.conf -> aj locally.  freefall doesn't have
>> /etc/malloc.conf.  MALLOC_OPTIONS no longer works, and MALLOC_CONF
>> is too large for me to understand, so I don't know how to turn off
>> non-production features dynamically.
>
>FWIW, I suspected MALLOC_PRODUCTION in some massive slowdowns I see
>from time to time on my -CURRENT box.  Most vividly around running
>portupgrade-related bits (portupgrade, pkgdb, etc).  I got annoyed by
>it enough a few weeks ago to write up a quickie to bang malloc()
>around and see what happened.  Attached, just for grins.

Not defining MALLOC_PRODUCTION causes quite significant startup
costs for any process that uses malloc() at all.  In this case,
jemalloc verifies that memory obtained from the kernel is zero-filled,
causing (thousands of unnecessary) page faults.  For a short-running
process that doesn't allocate all the space in the jemalloc arenas,
this dominates the runtime - in the case of /bin/echo, I measured
87 page faults with MALLOC_PRODUCTION and 2133 without.

--=20
Peter Jeremy

--VS++wcV0S1rZb1Fb
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlC5HJMACgkQ/opHv/APuIeCqACgtQM6+UkZ7zbht12xgkTZoilv
Mf0AoJ0aeI5dZENkCDFSkE2RX3PNZJ9D
=nraQ
-----END PGP SIGNATURE-----

--VS++wcV0S1rZb1Fb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121130205235.GA84363>