Ship server with libjemalloc

Bug #1099774 reported by Raghavendra D Prabhu on 2013-01-15
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Laurynas Biveinis
5.1
Won't Fix
Undecided
Unassigned
5.5
Fix Released
Medium
Unassigned
5.6
Fix Released
Medium
Laurynas Biveinis
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
Fix Released
Undecided
Unassigned

Bug Description

MySQL 5.5.29 ships with libtcmalloc_minimal and is built with it.
It would be good if we follow something similar based on our
previous benchmarks like -- http://www.mysqlperformanceblog.com/2012/07/05/impact-of-memory-allocators-on-mysql-performance/

Related branches

Vadim Tkachenko (vadim-tk) wrote :

we are going to ship jemalloc

Changed in percona-server:
status: New → In Progress
assignee: nobody → Ignacio Nin (ignacio-nin)
milestone: none → 5.5.30-30.1
summary: - Upstream ships with libtcmalloc_minimal
+ Ship server with libjemalloc
Changed in percona-xtradb-cluster:
status: New → Triaged
Changed in percona-xtradb-cluster:
milestone: none → 5.5.30-23.7.4
status: Triaged → Fix Released
Download full text (3.3 KiB)

Is it normal not to find libjemalloc after installing latest Percona Server 5.6.27 from source?

As per documentation path to libjemalloc.so must be specified:

https://github.com/percona/tokudb-percona-server-5.6/wiki/Run-mysqld-with-jemalloc
https://www.percona.com/doc/percona-server/5.6/tokudb/tokudb_installation.html#libjemalloc-library

CMAKE command:

cmake -DCMAKE_INSTALL_PREFIX=/opt/percona-5.6.27 -DMYSQL_DATADIR=/opt/percona-5.6.27/datadir -DSYSCONFDIR=/opt/ -DWITH_SSL=system -DMYSQL_TCP_PORT=3307 -DMYSQL_UNIX_ADDR=/opt/percona-5.6.27/mysqld.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_DEBUG=1 -DCOMPILATION_COMMENT="Shahriyar Rzayev's Percona Server" -DOPTIMIZER_TRACE=1 -DWITH_ZLIB=system -DWITH_VALGRIND=1 -DCMAKE_C_FLAGS=-DHAVE_purify -DCMAKE_CXX_FLAGS=-DHAVE_purify -DENABLE_DOWNLOADS=1

make
make install

No result:

[root@testing-host1 ~]# locate jemalloc
[root@testing-host1 ~]# locate libjemalloc
[root@testing-host1 ~]# ls /usr/local/ | grep jemalloc
[root@testing-host1 ~]# ls /usr/local/ | grep libjemalloc
[root@testing-host1 ~]# ls /usr/local/ | grep malloc

Again no result:

[root@testing-host1 ~]# ls /opt/percona-5.6.27/lib/
libHotBackup.so libmysqlservices.a libperconaserverclient_r.a libperconaserverclient_r.so.18 libperconaserverclient.so libperconaserverclient.so.18.1.0
libmysqld.a libperconaserverclient.a libperconaserverclient_r.so libperconaserverclient_r.so.18.1.0 libperconaserverclient.so.18 mysql
[root@testing-host1 ~]# ls /opt/percona-5.6.27/lib/ | grep malloc
[root@testing-host1 ~]# ls /opt/percona-5.6.27/lib/mysql/ | grep malloc

It is also obvious that jemalloc is not shipped with official .tar.gz:

[root@testing-host1 ~]# tar -ztvf Percona-Server-5.6.27-rel75.0-Linux.x86_64.ssl101.tar.gz | grep jemalloc
[root@testing-host1 ~]# tar -ztvf Percona-Server-5.6.27-rel75.0-Linux.x86_64.ssl101.tar.gz | grep malloc
-rw-r--r-- root/root 1506 2015-11-03 15:14 Percona-Server-5.6.27-rel75.0-Linux.x86_64.ssl101/mysql-test/suite/innodb/r/innodb-use-sys-malloc.result
-rw-r--r-- root/root 56 2015-11-03 15:14 Percona-Server-5.6.27-rel75.0-Linux.x86_64.ssl101/mysql-test/suite/innodb/t/innodb-use-sys-malloc-master.opt
-rw-r--r-- root/root 1560 2015-11-03 15:14 Percona-Server-5.6.27-rel75.0-Linux.x86_64.ssl101/mysql-test/suite/innodb/t/innodb-use-sys-malloc.test
-rw-r--r-- root/root 1017 2015-11-03 15:14 Percona-Server-5.6.27-rel75.0-Linux.x86_64.ssl101/mysql-test/suite/sys_vars/r/innodb_use_sys_malloc_basic.result
-rw-r--r-- root/root 796 2015-11-03 15:14 Percona-Server-5.6.27-rel75.0-Linux.x86_64.ssl101/mysql-test/suite/sys_vars/t/innodb_use_sys_malloc_basic.test

Another thing to mention about Ubuntu percona-server-tokudb-5.6 package. It has libjemalloc1 dependency which is installing as separate package:

sudo apt-get install percona-server-tokudb-5.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
 libjemalloc1
The following NEW packages will be installed:
 libjemalloc1 percona-server-tokudb-5.6

So the result is with binary version jemalloc installed as d...

Read more...

We are not *shipping* jemalloc. Users must get it from somewhere else.

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1281

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1299

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers