Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1364190 - Change example in /etc/sysconfig/dirsrv to use tcmalloc
Change example in /etc/sysconfig/dirsrv to use tcmalloc
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
7.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Noriko Hosoi
Viktor Ashirov
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-04 12:31 EDT by Viktor Ashirov
Modified: 2016-11-03 16:44 EDT (History)
4 users (show)

See Also:
Fixed In Version: 389-ds-base-1.3.5.10-9.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 16:44:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2594 normal SHIPPED_LIVE Moderate: 389-ds-base security, bug fix, and enhancement update 2016-11-03 08:11:08 EDT

  None (edit)
Description Viktor Ashirov 2016-08-04 12:31:12 EDT
tail -n 5 /etc/sysconfig/dirsrv
# jemalloc is a general purpose malloc implementation that emphasizes
# fragmentation avoidance and scalable concurrency support.  jemalloc
# has been shown to have a significant positive impact on the Directory
# Server's process size/growth.
#LD_PRELOAD=/usr/lib64/dirsrv/libjemalloc.so.1 ; export LD_PRELOAD

This should be changed to tcmalloc.
Change is required by https://bugzilla.redhat.com/show_bug.cgi?id=1301224
Comment 1 Noriko Hosoi 2016-08-04 20:56:14 EDT
Upstream ticket:
https://fedorahosted.org/389/ticket/48950
Comment 2 mreynolds 2016-08-11 11:45:48 EDT
Fixed upstream
Comment 4 Viktor Ashirov 2016-08-22 13:27:17 EDT
Aug 22 19:16:00 rhel7ds.brq.redhat.com ns-slapd[2675]: ERROR: ld.so: object ';' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 19:16:00 rhel7ds.brq.redhat.com ns-slapd[2675]: ERROR: ld.so: object 'export' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 19:16:00 rhel7ds.brq.redhat.com ns-slapd[2675]: ERROR: ld.so: object 'LD_PRELOAD' from LD_PRELOAD cannot be preloaded: ignored.

Line in /etc/sysconfig/dirsrv should be changed to:
LD_PRELOAD=/usr/lib64/libtcmalloc.so.4

After this change there are no errors in journalctl and:
[root@rhel7ds ~]# pldd  $(pidof ns-slapd) | grep tcmalloc
/usr/lib64/libtcmalloc.so

Marking as ASSIGNED.
Comment 5 Noriko Hosoi 2016-08-22 13:51:30 EDT
Hi Viktor,

I'm a bit confused.  This is our suggestion to enable tcmalloc, which looks identical to the line you put in your comment #c4.  What else we could do?

diff --git a/ldap/admin/src/base-initconfig.in b/ldap/admin/src/base-initconfig.in
index e803a36..0481c3e 100644
--- a/ldap/admin/src/base-initconfig.in
+++ b/ldap/admin/src/base-initconfig.in
@@ -43,8 +43,8 @@
 # if using systemd, omit the "; export VARNAME" at the end
 #PID_TIME=600 ; export PID_TIME
 
-# jemalloc is a general purpose malloc implementation that emphasizes
-# fragmentation avoidance and scalable concurrency support.  jemalloc
-# has been shown to have a significant positive impact on the Directory
-# Server's process size/growth.
-#LD_PRELOAD=@libdir@/@package_name@/libjemalloc.so.1 ; export LD_PRELOAD
+# The tcmalloc memory allocator has been shown to have a positive impact on
+# the Directory Server's virtual & resident memory size/growth.  tcmalloc is
+# available on RHEL/Fedora in the gperftools package (this could be different
+# on other platforms).  Here is an example of preloading tcmalloc:
+#LD_PRELOAD=@libdir@/libtcmalloc.so.4 ; export LD_PRELOAD
Comment 6 Viktor Ashirov 2016-08-22 14:15:56 EDT
LD_PRELOAD=/usr/lib64/libtcmalloc.so.4 ; export LD_PRELOAD
                                       ^^^^^^^^^^^^^^^^^^^
This part confuses systemd. Error are logged in journalctl on dirsrv startup:

Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object ';' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object 'export' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object 'LD_PRELOAD' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object ';' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object 'export' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object 'LD_PRELOAD' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object ';' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object 'export' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object 'LD_PRELOAD' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object ';' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object 'export' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ds_systemd_ask_password_acl[4891]: ERROR: ld.so: object 'LD_PRELOAD' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ns-slapd[4897]: ERROR: ld.so: object ';' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ns-slapd[4897]: ERROR: ld.so: object 'export' from LD_PRELOAD cannot be preloaded: ignored.
Aug 22 20:13:51 rhel7ds.brq.redhat.com ns-slapd[4897]: ERROR: ld.so: object 'LD_PRELOAD' from LD_PRELOAD cannot be preloaded: ignored.
Comment 7 Noriko Hosoi 2016-08-22 14:31:25 EDT
(In reply to Viktor Ashirov from comment #6)
> LD_PRELOAD=/usr/lib64/libtcmalloc.so.4 ; export LD_PRELOAD
>                                        ^^^^^^^^^^^^^^^^^^^
Oh my...  Sorry, I should have looked at the error logs more closely...  I've reopened the upstream ticket, as well...
Comment 8 Rich Megginson 2016-08-22 16:32:40 EDT
In a systemd environment file, you must use 

LD_PRELOAD=/usr/lib64/libtcmalloc.so.4

You cannot use the old sysvinit/bash style:

LD_PRELOAD=/usr/lib64/libtcmalloc.so.4 ; export LD_PRELOAD
Comment 9 Viktor Ashirov 2016-09-05 11:51:34 EDT
Build tested: 389-ds-base-1.3.5.10-10.el7.x86_64

Text was changed to:
# The tcmalloc memory allocator has been shown to have a positive impact on
# the Directory Server's virtual & resident memory size/growth.  tcmalloc is
# available on RHEL/Fedora in the gperftools-libs package (this could be
# different on other platforms).
# If using systemd, omit the "; export LD_PRELOAD" at the end.
LD_PRELOAD=/usr/lib64/libtcmalloc.so.4 ; export LD_PRELOAD

Marking as VERIFIED.
Comment 11 errata-xmlrpc 2016-11-03 16:44:46 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-2594.html

Note You need to log in before you can comment on or make changes to this bug.