Hi, Otto, On Aug 30, Otto Kekäläinen wrote: > > > There are some rumors online about jemalloc not being maintained > > > very well, and Google is promoting its tcmalloc. I noticed MySQL > > > in Ubuntu just switched to tcmalloc: > > > https://salsa.debian.org/mariadb-team/mysql/-/commit/90ad5c209de57f21c5554e549bddc1518cd57052 > .. > > tcmalloc works better than jemalloc in these cases - there were > > cases when switching to jemalloc didn't fix the memory leak, but > > switching to tcmalloc did. And there were few users having problem > > with MariaDB on jemalloc, and none about tcmalloc - but perhaps it's > > only because tcmalloc is used less. > > What is the correct way to enable tcmalloc with MariaDB? I grepped > through the code and use of `MALLOC_LIB` in CMake files, but I didn't > figure out what kind of build flags I should pass to it. MySQL sees to > have the explicit flag `WITH_TCMALLOC` but MariaDB does not have the > equivalent.
[Service] Environment=LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libtcmalloc.so in the mariadb service file. Or, if you use mariadbd-safe, [mariadbd-safe] malloc-lib=/usr/lib/x86_64-linux-gnu/libtcmalloc.so it's all documented here: https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/installing-mariadb/compiling-mariadb-from-source/compiling-mariadb-with-extra-modulesoptions/using-mariadb-with-tcmalloc-or-jemalloc > For reference, the filelist of the jemalloc and tcmalloc development > libraries in Debian: > https://packages.debian.org/sid/amd64/libjemalloc-dev/filelist > https://packages.debian.org/sid/amd64/libgoogle-perftools-dev/filelist Regards, Sergei Chief Architect, MariaDB Server and secur...@mariadb.org _______________________________________________ developers mailing list -- developers@lists.mariadb.org To unsubscribe send an email to developers-le...@lists.mariadb.org