[rhelv6-list] RHEL7 MariaDB malloc-lib not taking effect

M. Hamzah Khan hamzah at hamzahkhan.com
Wed Sep 10 09:52:50 UTC 2014


Hey everyone,

(Sorry for posting this on the RHEL6 list!)

I'm in the process of building new dev DB server, running RHEL7 and
MariaDB.

Having read a few articles which mention jemalloc/tcmalloc giving
MySQL/MariaDB a performance boost, I wanted to give it a go and see how
well it works out for me.

So I edited /etc/my.cnf.d/server.cnf, and dropped the following in:
[mysqld_safe]
malloc-lib = /usr/lib64/libjemalloc.so.1

Which should cause mysqld_safe to add /usr/lib64/libjemalloc.so.1 to
LD_PRELOAD.

Next, I started MariaDB with "systemctl start  mariadb.service", and in
the logs I see:

mysqld_safe Adding '/usr/lib64/libjemalloc.so.1' to LD_PRELOAD for
mysqld

I can also confirm that LD_PRELOAD has been set correctly using
cat /proc/$(pidof mysqld)/environ

But, using lsof or pmap, I don't see libjemalloc loaded.

Am I doing this wrong?

I'm quite lost why it's not working if the environmental variable is
being set correctly. :/




More information about the rhelv6-list mailing list