jemalloc like tcmalloc is a high performance replacement for glibc malloc.
Which is better for ceph can only be told via benchmarks and testing.
This patch makes it easer to test this as an rpm install.
Signed-off-by: Owen Synge <osynge@suse.com>
(cherry picked from commit
7b24b9bfc0a49c9eac6f07eee4d5a52eceddbb34)
Conflicts:
ceph.spec.in
_udevrulesdir
%bcond_without cephfs_java
%bcond_with tests
%bcond_without tcmalloc
+%bcond_with jemalloc
+
%bcond_without libs_compat
%bcond_with librocksdb
%if 0%{with cephfs_java}
BuildRequires: sharutils
%endif
+%if 0%{with jemalloc}
+BuildRequires: jemalloc-devel
+%endif
BuildRequires: gcc-c++
BuildRequires: boost-devel
BuildRequires: cryptsetup
%endif
$MY_CONF_OPT \
%{?_with_ocf} \
- %{?_with_tcmalloc} \
+%if 0%{with tcmalloc}
+ --with-tcmalloc \
+ --without-jemalloc \
+%endif
+%if 0%{with jemalloc}
+ --without-tcmalloc \
+ --with-jemalloc \
+%endif
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS"
# fix bug in specific version of libedit-devel