<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 04/16/2012 11:59 AM, Russell Beall wrote:
    <blockquote cite="mid:A7648286-2E2F-459A-AA84-F4C064407A45@usc.edu"
      type="cite">Hi,
      <div><br>
      </div>
      <div>I have been working with 389 as a potential replacement for
        Sun DS and I have found it to be an excellent choice in every
        aspect except the final tests I have been running.</div>
      <div><br>
      </div>
      <div>I am running with the current version for RedHat 6, but not
        the latest from the rmeggins repo:</div>
      <div>
        <div>Name        : 389-ds</div>
        <div>Arch        : noarch</div>
        <div>Version     : 1.2.2</div>
      </div>
      <div><br>
      </div>
      <div>
        <div>Name        : 389-ds-base</div>
        <div>Arch        : x86_64</div>
        <div>Version     : 1.2.9.14</div>
      </div>
      <div><br>
      </div>
      <div>I have searched through all the release notes and part of the
        389-users list archive for clues as to the possible memory leaks
        and/or patches in the latest releases, but no information has
        been forthcoming.</div>
      <div><br>
      </div>
      <div>The behavior I am seeing is a total memory consumption
        occurring over a large quantity of ldapmodify operations.  To
        test this, I reduced the size of the directory from 10GB down to
        about 1.7GB.  Then I set up a loop that would run an ldapmodify
        that would delete of most of those entries followed by an
        ldamodify that would add all those deleted back in (and then
        repeat indefinitely).</div>
      <div><br>
      </div>
      <div>The directory starts out by loading all the entries into the
        cache and using a few GB of ram to hold everything.  Eventually,
        this loop causes the entire 32GB of ram to be consumed even
        though the total size of the directory does not change (e.g.
        currententrycachesize: 1791096898).</div>
      <div><br>
      </div>
      <div>Replication is enabled to a consumer and the change log is up
        to 7.4 GB, and it doesn't seem to want to clean out the change
        log even with short purge times and short entry lifetimes
        configured, so perhaps something is at issue here.</div>
    </blockquote>
    <br>
    Can you post your purge/trimming configuration parameters?<br>
    <br>
    <blockquote cite="mid:A7648286-2E2F-459A-AA84-F4C064407A45@usc.edu"
      type="cite">
      <div>The consumer has processed all updates and also seems to
        exhibit overconsumption of memory.</div>
    </blockquote>
    <br>
    Do you see any issue if you don't use replication at all?   That is,
    is this issue related to replication?<br>
    <br>
    <blockquote cite="mid:A7648286-2E2F-459A-AA84-F4C064407A45@usc.edu"
      type="cite">
      <div><br>
      </div>
      <div>Are there any pointers related to this?</div>
    </blockquote>
    <br>
    Are you seeing <a class="moz-txt-link-freetext" href="https://fedorahosted.org/389/ticket/51">https://fedorahosted.org/389/ticket/51</a> ?<br>
    When you start to see memory growth, are you using all of your
    cache?<br>
    <br>
    <blockquote cite="mid:A7648286-2E2F-459A-AA84-F4C064407A45@usc.edu"
      type="cite">
      <div><br>
      </div>
      <div>If there is no information about this, is there a
        documentation page that might instruct me in the correct way to
        attach valgrind to the ns-slapd process so I can see if there is
        some kind of huge leak?</div>
    </blockquote>
    <br>
    AFAIK you can't attach valgrind to a running process.<br>
    try this:<br>
    <br>
    service dirsrv stop<br>
    ( . /etc/sysconfig/dirsrv ; . /etc/sysconfig/dirsrv-INSTANCENAME ;
    valgrind -q  --tool=memcheck --leak-check=yes --leak-resolution=high
    --num-callers=50
    --log-file=/var/log/dirsrv/slapd-INSTANCENAME/valgrind.log
    /usr/sbin/ns-slapd -D /etc/dirsrv/slapd-INSTANCENAME -i
    /var/run/dirsrv/slapd-INSTANCENAME.pid -w
    /var/run/dirsrv/slapd-INSTANCENAME.startpid -d 0 ) &amp;<br>
    <br>
    valgrind will log to /var/log/dirsrv/slapd-INSTANCENAME/valgrind.log<br>
    <br>
    Note that running your server with valgrind will really cripple the
    performance - may be unusable in a production environment - you may
    also run afoul of selinux<br>
    valgrind will not report memory leaks until you shutdown the server
    (just kill -15 &lt;pid of ns-slapd or valgrind&gt;)<br>
    <blockquote cite="mid:A7648286-2E2F-459A-AA84-F4C064407A45@usc.edu"
      type="cite">
      <div><br>
      </div>
      <div>Thanks very much,</div>
      <div>Russ.</div>
      <div><br>
      </div>
      <div><span class="Apple-style-span" style="font-size: 12px; ">==============================</span></div>
      <div><span class="Apple-style-span" style="border-collapse:
          separate; color: rgb(0, 0, 0); font-family: Helvetica;
          font-style: normal; font-variant: normal; font-weight: normal;
          letter-spacing: normal; line-height: normal; orphans: 2;
          text-align: -webkit-auto; text-indent: 0px; text-transform:
          none; white-space: normal; widows: 2; word-spacing: 0px;
          -webkit-border-horizontal-spacing: 0px;
          -webkit-border-vertical-spacing: 0px;
          -webkit-text-decorations-in-effect: none;
          -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
          0px; font-size: medium; "><span class="Apple-style-span"
            style="border-collapse: separate; color: rgb(0, 0, 0);
            font-family: Helvetica; font-style: normal; font-variant:
            normal; font-weight: normal; letter-spacing: normal;
            line-height: normal; orphans: 2; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
            -webkit-border-vertical-spacing: 0px;
            -webkit-text-decorations-in-effect: none;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; font-size: medium; ">
            <div style="word-wrap: break-word; -webkit-nbsp-mode: space;
              -webkit-line-break: after-white-space; "><span
                class="Apple-style-span" style="border-collapse:
                separate; color: rgb(0, 0, 0); font-family: Helvetica;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; line-height: normal;
                orphans: 2; text-indent: 0px; text-transform: none;
                white-space: normal; widows: 2; word-spacing: 0px;
                -webkit-border-horizontal-spacing: 0px;
                -webkit-border-vertical-spacing: 0px;
                -webkit-text-decorations-in-effect: none;
                -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px; font-size: medium; ">
                <div style="word-wrap: break-word; -webkit-nbsp-mode:
                  space; -webkit-line-break: after-white-space; ">
                  <div>
                    <div style="font-size: 12px; ">Russell Beall<br>
                      Programmer Analyst IV</div>
                    <div style="font-size: 12px; ">Enterprise Identity
                      Management</div>
                    <div style="font-size: 12px; ">University of Southern
                      California</div>
                    <div style="font-size: 12px; "><a
                        moz-do-not-send="true"
                        href="mailto:beall@usc.edu">beall@usc.edu</a></div>
                  </div>
                </div>
              </span></div>
          </span></span><span class="Apple-style-span" style="font-size:
          12px; ">==============================</span><span
          class="Apple-style-span" style="border-collapse: separate;
          color: rgb(0, 0, 0); font-family: Helvetica; font-style:
          normal; font-variant: normal; font-weight: normal;
          letter-spacing: normal; line-height: normal; orphans: 2;
          text-align: -webkit-auto; text-indent: 0px; text-transform:
          none; white-space: normal; widows: 2; word-spacing: 0px;
          -webkit-border-horizontal-spacing: 0px;
          -webkit-border-vertical-spacing: 0px;
          -webkit-text-decorations-in-effect: none;
          -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
          0px; font-size: medium; "><span class="Apple-style-span"
            style="border-collapse: separate; color: rgb(0, 0, 0);
            font-family: Helvetica; font-style: normal; font-variant:
            normal; font-weight: normal; letter-spacing: normal;
            line-height: normal; orphans: 2; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
            -webkit-border-vertical-spacing: 0px;
            -webkit-text-decorations-in-effect: none;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; font-size: medium; ">
            <div style="word-wrap: break-word; -webkit-nbsp-mode: space;
              -webkit-line-break: after-white-space; "><span
                class="Apple-style-span" style="border-collapse:
                separate; color: rgb(0, 0, 0); font-family: Helvetica;
                font-style: normal; font-variant: normal; font-weight:
                normal; letter-spacing: normal; line-height: normal;
                orphans: 2; text-indent: 0px; text-transform: none;
                white-space: normal; widows: 2; word-spacing: 0px;
                -webkit-border-horizontal-spacing: 0px;
                -webkit-border-vertical-spacing: 0px;
                -webkit-text-decorations-in-effect: none;
                -webkit-text-size-adjust: auto;
                -webkit-text-stroke-width: 0px; font-size: medium; ">
                <div style="word-wrap: break-word; -webkit-nbsp-mode:
                  space; -webkit-line-break: after-white-space; ">
                  <div><br>
                  </div>
                </div>
              </span><br class="Apple-interchange-newline">
            </div>
          </span><br class="Apple-interchange-newline">
        </span><br class="Apple-interchange-newline">
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">--
389 users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:389-users@lists.fedoraproject.org">389-users@lists.fedoraproject.org</a>
<a class="moz-txt-link-freetext" href="https://admin.fedoraproject.org/mailman/listinfo/389-users">https://admin.fedoraproject.org/mailman/listinfo/389-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>