KOSAKI Motohiro <kosaki.motohiro / gmail.com> wrote:
> Do we have only one benchmark provided by Sam? I don't think it is
> enough much comparison to make decision.

Empirical evidence on my 32-bit yahns server after running several days
shows ~40M RSS w/ jemalloc 3.0/3.6 vs 60-80M RSS for eglibc malloc on
Debian stable.  I'll work on gathering more data for other systems.

> Anyway, I don't think Linux distros enable jemalloc because of their
> packaging policy even if we enable by default.

I know distros do not like bundling extra libs, but I'm not aware of
policies against extra linkage for already packaged libraries.

Looking at Debian stable packages, both redis and varnish packages[1]
use jemalloc on common architectures.  For redis, Debian just favors the
system jemalloc instead of the bundled one.

> So we need, at least
> 1. A way to disable it

My patch respects the --without-jemalloc option

> 2. Easy to detect which malloc is used from bug reports. For our maintenance.

rb_bug already shows dynamically loaded libraries.  My patch only enables dynamic
link by default.

[1] http://http.us.debian.org/debian/pool/main/r/redis/redis_2.4.14-1.dsc
http://http.us.debian.org/debian/pool/main/r/redis/redis_2.4.14.orig.tar.gz
http://http.us.debian.org/debian/pool/main/r/redis/redis_2.4.14-1.debian.tar.gz
http://http.us.debian.org/debian/pool/main/v/varnish/varnish_3.0.2-2+deb7u1.dsc
http://http.us.debian.org/debian/pool/main/v/varnish/varnish_3.0.2.orig.tar.gz
http://http.us.debian.org/debian/pool/main/v/varnish/varnish_3.0.2-2+deb7u1.debian.tar.gz