<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi Denys,<br>
    <br>
    That is really weird, 4 out of 5 traps point to the shm_malloc()
    function, trying to get a free mem check. What is the usage of the
    shm mem (use the shmem: stats class to see) ? How many times you do
    this reload? does it get slow from the first?<br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="https://www.opensips-solutions.com">https://www.opensips-solutions.com</a>
  <a class="moz-txt-link-freetext" href="https://www.siphub.com">https://www.siphub.com</a></pre>
    <div class="moz-cite-prefix">On 14.05.2024 16:47, Denys Pozniak
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CA+x3AxoSnbppn6Fg6X-j6XCS43aZLUjpiOG4=cmq=G5p1xaohw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Hello!
        <div><br>
        </div>
        <div>I disabled logging and added some resources to the virtual
          machine.<br>
          On a working OpenSIPS, I reloaded the tls several times and in
          parallel ran a trap.<br>
          #opensips-cli -x mi tls_reload<br>
        </div>
        <div>#opensips-cli -x trap</div>
        <div>
          <div><br>
          </div>
          If possible, please analyze it again, maybe you could find
          something interesting:<br>
          <div><a
href="https://github.com/denyspozniak/opensips_tls_debug/tree/main"
              moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/denyspozniak/opensips_tls_debug/tree/main</a><br>
          </div>
          <div><br>
          </div>
        </div>
        <div>Thanks in advance!</div>
        <div>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">ср, 8 мая 2024 г. в 19:59,
          Brett Nemeroff <<a href="mailto:brett@nemeroff.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">brett@nemeroff.com</a>>:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">Just offering my experience here. I have,
            without a doubt, noticed intensive logging brings a highly
            performant server to its knees. 
            <div><br>
            </div>
            <div>Disable ALL logging. Watch disk IO and confirm it's
              disabled. Try it again. Just an easy thing to try. </div>
            <div><br>
            </div>
            <div>-Brett</div>
            <div><br>
            </div>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Wed, May 8, 2024 at
              7:17 AM Bogdan-Andrei Iancu <<a
                href="mailto:bogdan@opensips.org" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">bogdan@opensips.org</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
              <div> <font face="monospace">Hi,<br>
                  <br>
                  There is only one trap, ideally you should try to get
                  several during the reload time.<br>
                  <br>
                  Still, the trap you did shows opensips doing some
                  logging (dumping to syslog) while reloading - could
                  you check how intensive this logging is and eventually
                  to try to disable it (increase the log level of
                  opensips lower than INFO) to see if there is any
                  impact?<br>
                  <br>
                  Regards,<br>
                </font>
                <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://www.opensips-solutions.com</a>
  <a href="https://www.siphub.com" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://www.siphub.com</a></pre>
                <div>On 08.05.2024 14:10, Denys Pozniak wrote:<br>
                </div>
                <blockquote type="cite">
                  <div dir="ltr">Hello!
                    <div><br>
                    </div>
                    <div>If possible, please check log:</div>
                    <div><a
href="https://github.com/denyspozniak/opensips_tls_debug/blob/main/gdb_opensips_20240508_115956"
                        target="_blank" moz-do-not-send="true"
                        class="moz-txt-link-freetext">https://github.com/denyspozniak/opensips_tls_debug/blob/main/gdb_opensips_20240508_115956</a><br>
                    </div>
                    <div><br>
                    </div>
                  </div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">ср, 8 мая 2024 г.
                      в 08:55, Bogdan-Andrei Iancu <<a
                        href="mailto:bogdan@opensips.org"
                        target="_blank" moz-do-not-send="true"
                        class="moz-txt-link-freetext">bogdan@opensips.org</a>>:<br>
                    </div>
                    <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                      <div> <font face="monospace">Hi Denys.<br>
                          <br>
                          That is rather weird, 250 certificates in 1
                          min. I assume it is not a DB issue
                          (considering the db_text backend), so can you
                          try to do multiple sequential "opensips-cli -x
                          trap" to try to understand what is going on ?<br>
                          <br>
                          Regards,<br>
                        </font>
                        <pre cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a href="https://www.opensips-solutions.com" target="_blank"
                        moz-do-not-send="true"
                        class="moz-txt-link-freetext">https://www.opensips-solutions.com</a>
  <a href="https://www.siphub.com" target="_blank"
                        moz-do-not-send="true"
                        class="moz-txt-link-freetext">https://www.siphub.com</a></pre>
                        <div>On 02.05.2024 11:41, Denys Pozniak wrote:<br>
                        </div>
                        <blockquote type="cite">
                          <div dir="ltr">Hello!
                            <div><br>
                            </div>
                            There is a task to divide a single tls/ssl
                            letsencrypt certificate for white labels
                            into specific ones.
                            <div>I entered about ~250 certificates into
                              db_text, but as it turned out, for
                              OpenSIPS this is a rather complex
                              operation to load them and takes about 1
                              minute and a heavy CPU load is noticeable.
                              <div><br>
                              </div>
                              <div>I would appreciate any advice on how
                                to avoid this.<br>
                              </div>
                              <div><br>
                              </div>
                              <div># wc -l dbtext/tls_mgm<br>
                                253 dbtext/tls_mgm<br>
                              </div>
                              <div><br>
                              </div>
                              <div># time opensips-cli -x mi tls_reload
                                <div>"OK"</div>
                                <div>real 0m52.034s</div>
                                <div>user 0m1.419s</div>
                                <div>sys 0m0.433s</div>
                                <div><br>
                                </div>
                                <div># time systemctl restart opensips<br>
                                  real    0m58.198s<br>
                                  user    0m0.024s<br>
                                  sys     0m0.055s<br>
                                  <div><span
                                      class="gmail_signature_prefix"><br>
                                    </span></div>
                                  <div><span
                                      class="gmail_signature_prefix">#
                                      opensips -V<br>
                                      version: opensips 3.4.4
                                      (x86_64/linux)<br>
                                      flags: STATS: On, DISABLE_NAGLE,
                                      USE_MCAST, SHM_MMAP, PKG_MALLOC,
                                      Q_MALLOC, F_MALLOC, HP_MALLOC,
                                      DBG_MALLOC,
                                      FAST_LOCK-ADAPTIVE_WAIT<br>
                                      ADAPTIVE_WAIT_LOOPS=1024,
                                      MAX_RECV_BUFFER_SIZE 262144,
                                      MAX_LISTEN 16, MAX_URI_SIZE 1024,
                                      BUF_SIZE 65535<br>
                                      poll method support: poll, epoll,
                                      sigio_rt, select.<br>
                                      git revision: 036d02961<br>
                                    </span></div>
                                  <div><span
                                      class="gmail_signature_prefix"><br>
                                    </span></div>
                                  <div><span
                                      class="gmail_signature_prefix">--
                                    </span><br>
                                    <div dir="ltr"
                                      class="gmail_signature">
                                      <div dir="ltr"><br>
                                        <div>
                                          <div>BR,</div>
                                          <div>Denys Pozniak<br>
                                          </div>
                                          <div><br>
                                          </div>
                                          <div><br>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                          <br>
                          <fieldset></fieldset>
                          <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank"
                          moz-do-not-send="true"
                          class="moz-txt-link-freetext">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                          target="_blank" moz-do-not-send="true"
                          class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                        </blockquote>
                        <br>
                      </div>
                    </blockquote>
                  </div>
                  <br clear="all">
                  <div><br>
                  </div>
                  <span class="gmail_signature_prefix">-- </span><br>
                  <div dir="ltr" class="gmail_signature">
                    <div dir="ltr"><br>
                      <div>
                        <div>BR,</div>
                        <div>Denys Pozniak<br>
                        </div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                      </div>
                    </div>
                  </div>
                </blockquote>
                <br>
              </div>
              _______________________________________________<br>
              Users mailing list<br>
              <a href="mailto:Users@lists.opensips.org" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">Users@lists.opensips.org</a><br>
              <a
href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
                rel="noreferrer" target="_blank" moz-do-not-send="true"
                class="moz-txt-link-freetext">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br clear="all">
      <div><br>
      </div>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr"><br>
          <div>
            <div>BR,</div>
            <div>Denys Pozniak<br>
            </div>
            <div><br>
            </div>
            <div><br>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>