[rfc] enabling MALLOC_PRODUCTION on -HEAD for now, until jemalloc has been taught to have some run time selectable debug options

Adrian Chadd adrian at freebsd.org
Thu Jan 24 20:30:43 UTC 2013


On 24 January 2013 10:40, Jason Evans <jasone at freebsd.org> wrote:

> I imported jemalloc 3.3.0 last night, which I think will restore non-MALLOC_PRODUCTION performance to roughly what it has been for years.  The key change was a patch by Ian Lepore:
>
>         http://www.canonware.com/cgi-bin/gitweb.cgi?p=jemalloc.git;a=commitdiff;h=14a2c6a698a207ac3f3825443cf3441c8842e990
>
> In practice, the zeroed memory validation should no longer execute at all on FreeBSD due to madvise(...MADV_FREE) not guaranteeing zeroed memory.
>
> I don't know how significant the impact will be on constrained/older systems, but for the many buildworld repetitions I did during testing it improved throughput by >1.5X.  With this change in place, I'm not keen on enabling MALLOC_PRODUCTION by default, because the assertions are useful both for detecting bugs in jemalloc (heaven forbid), and for indicating that crashes within jemalloc are application errors.  The only other significant source of overhead I'm aware of is junk filling, which we've had enabled by default on -current for ages, probably since the introduction of phkmalloc.  If you don't like it:
>
>         ln -s 'junk:false' /etc/malloc.conf
>
> If a substantial performance difference remains for you (MALLOC_PRODUCTION vs non-MALLOC_PRODUCTION with junk:false set), please let me know.

Sweet, thanks. I'll do up a new -HEAD MIPS, ARM and PPC test builds
tonight and let you know how it all goes.

I'd love to keep MALLOC_PRODUCTION off on -HEAD by default. :-)

Thank you to both you and Ian for spearheading this change to your
malloc library. :)




Adrian


More information about the freebsd-arch mailing list