Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change example in /etc/sysconfig/dirsrv to use tcmalloc #2009

Closed
389-ds-bot opened this issue Sep 13, 2020 · 16 comments
Closed

Change example in /etc/sysconfig/dirsrv to use tcmalloc #2009

389-ds-bot opened this issue Sep 13, 2020 · 16 comments
Labels
closed: fixed Migration flag - Issue
Milestone

Comments

@389-ds-bot
Copy link

Cloned from Pagure issue: https://pagure.io/389-ds-base/issue/48950


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
@389-ds-bot 389-ds-bot added the closed: fixed Migration flag - Issue label Sep 13, 2020
@389-ds-bot 389-ds-bot added this to the 1.3.5.13 milestone Sep 13, 2020
@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2016-08-05 06:59:07

Is this good enough?

#LD_PRELOAD=/usr/lib64/dirsrv/libtcmalloc.so.4 ; export LD_PRELOAD

@389-ds-bot
Copy link
Author

Comment from nkinder (@nkinder) at 2016-08-05 08:38:32

Replying to [comment:1 nhosoi]:

Is this good enough?

#LD_PRELOAD=/usr/lib64/dirsrv/libtcmalloc.so.4 ; export LD_PRELOAD

I don't believe this is the correct path. We need to use the path for where tcmalloc is installed via the RPM that includes it (which may vary per platform, though I haven't checked Fedora vs. CentOS/RHEL).

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2016-08-05 20:05:54

Replying to [comment:1 nhosoi]:

Is this good enough?

#LD_PRELOAD=/usr/lib64/dirsrv/libtcmalloc.so.4 ; export LD_PRELOAD

This is definitely wrong. The previous line was from when we bundled jemalloc in DS (which was later removed). On fedora and rhel its /usr/lib64/libtcmalloc.so.4

We can always add a comment saying this is just an example and it could be different per OS platform.

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2016-08-11 01:50:56

Thanks for your comments, Nathan and Mark!

I did not spend any time on this... I just expected it could be just one line fix... :p

Mark, could you please take care of this? Thanks!!

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2016-08-11 02:51:42

Replying to [comment:4 nhosoi]:

Thanks for your comments, Nathan and Mark!

I did not spend any time on this... I just expected it could be just one line fix... :p

Mark, could you please take care of this? Thanks!!

No problem

@389-ds-bot
Copy link
Author

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2016-08-11 20:58:18

Perfect!

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2016-08-11 21:00:21

43de686..06a4adb master -> master
commit 06a4adb
Author: Mark Reynolds mreynolds389@redhat.com
Date: Thu Aug 11 10:50:02 2016 -0400

@389-ds-bot
Copy link
Author

Comment from nhosoi (@nhosoi) at 2016-08-23 00:30:51

Sadly, systemd does not like "; export LD_PRELOAD"...

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.

@389-ds-bot
Copy link
Author

Comment from lkrispen (@elkris) at 2016-08-24 20:41:39

Hi Mark, just nitpicking, but now there are the lines:

if using systemd, omit the "; export VARNAME" at the end

but no more export to omit, wouldn't this work

#PID_TIME=600 #; export PID_TIME

on systemd uncomment the line, on non-systemd also uncomment the export part

@389-ds-bot
Copy link
Author

Comment from amsharma (@amsharma3) at 2016-08-25 19:43:46

Hi,

According to the patch the text will include ::
"tcmalloc is available on RHEL/Fedora in the gperftools package (this could be different on other platforms)."

Today I tried to install gperftools rpm on my RHEL73 machine and it says "No package gperftools available." I have installed gperftools-libs which was available.

Would it be good to add the statement that "do yum install gperftools-libs" which is actually available on RHEL and will also do the needful.

I avoided the export statement because of systemd and uncommented "LD_PRELOAD=/usr/lib64/libtcmalloc.so.4 and restarted the dirsrv.

Now to check the tcmalloc, I did ::

ps -aef | grep slapd

dirsrv 23661 1 0 18:19 ? 00:00:01 /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-

#pldd 23661 | grep tcmalloc
/usr/lib64/libtcmalloc.so.4

So it works.

And is this document "http://www.port389.org/docs/389ds/FAQ/jemalloc-testing.html" also qualifies the testing for tcmalloc?

Thanks,
Amita

@389-ds-bot
Copy link
Author

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2016-08-25 23:43:32

New patch is attached...

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2016-08-26 01:13:50

2fb3c27..1e44c1f master -> master
commit 1e44c1f
Author: Mark Reynolds mreynolds389@redhat.com
Date: Thu Aug 25 13:39:25 2016 -0400

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2016-08-26 01:16:11

Replying to [comment:12 amsharma3]:

And is this document "http://www.port389.org/docs/389ds/FAQ/jemalloc-testing.html" also qualifies the testing for tcmalloc?

It does not. I only ran a few tests with tcmalloc, and it gave almost the same results as jemalloc.

@389-ds-bot
Copy link
Author

Comment from mreynolds (@mreynolds389) at 2017-02-11 22:52:13

Metadata Update from @mreynolds389:

  • Issue assigned to mreynolds389
  • Issue set to the milestone: 1.3.5.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: fixed Migration flag - Issue
Projects
None yet
Development

No branches or pull requests

1 participant