Date: Sun, 23 Dec 2012 21:00:03 +0100 From: Eike Dierks <eike@inter.net> To: freebsd-arch@freebsd.org Cc: jasone@canonware.com Subject: Re: jemalloc enhancement for small-memory systems Message-ID: <9EDB4DF7-6763-407C-BBCE-02915CDE7005@inter.net> In-Reply-To: <1356204505.1129.21.camel@revolution.hippie.lan> References: <1356204505.1129.21.camel@revolution.hippie.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Ian, I'm trying to understand the underlying problem. Looks like you already investigated that. Please tell us more about that. As far as I understand, jemalloc is not that bad at all. but it seems to get into conflict with the use of mlockall in some = situations. We should get Jason Evans in the boat to sort this out. malloc is not an easy task ... I once had the idea that the VM in FreeBSD was somehow build upon the = Mach VM? Is this still true today? How do they cope with this kind of problems in Darwin ~eike On Dec 22, 2012, at 20:28 , Ian Lepore wrote: > When a daemon such as watchdogd uses mlockall(2) on a small-memory > embedded system, it can end up wiring much of the available ram = because > jemalloc allocates large chunks of vmspace by default. More = background > info on this can be found in this thread: >=20 > = http://lists.freebsd.org/pipermail/freebsd-embedded/2012-November/001679.h= tml >=20 > It's hard to tune jemalloc's allocation behavior for this in a > machine-independent way because the minimum chunk size depends on > PAGE_SIZE and other factors internal to jemalloc. I've created a = patch > that addresses this by defining that lg_chunk:0 is implicitly a = request > to set the chunk size to the smallest value allowable for the machine > it's running on. The patch is attached to this PR... >=20 > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D174641 >=20 > Jason, could you please review this and consider incorporating it into > jemalloc? Or let us know if there's a better way to handle this > situation. >=20 > -- Ian >=20 >=20 > _______________________________________________ > freebsd-arch@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to = "freebsd-arch-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9EDB4DF7-6763-407C-BBCE-02915CDE7005>