<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    That assumption is based on common memory allocation patterns.
    Biggest ones typically come from tm, around 20k / transaction.<br>
    <br>
    I also assumed you set the <i>fr_timer</i> to a lower value (say 10
    seconds). So, in order to consume ~150MB of memory (tm's ratio out
    of 220MB), OpenSIPS needs to be holding only 7500 transactions, thus
    750 transactions / sec given my timer assumptions, or 250
    transactions / sec by default.<br>
    <br>
    I went with these assumptions as soon as I saw that <i>used_size</i>
    eventually returned to normal: 3MB, so it's doesn't look like we're
    dealing with a leak.<br>
    <br>
    So either bad performance tunings or some DOS attempts.<br>
    <br>
    <div class="moz-cite-prefix">On 04.03.2014 19:19, Mike Tesliuk
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAKNtoCE7wtXmeB+Hjq2UJ+3_JVfguVxiiy_P6CpAqnaKSJpOpA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hello Liviu , <br>
            <br>
            This opensips is on a small carrier, we expected in some
            weeks reach almost 2000 simultaneos calls, 750 is something
            that can happen right now, we have all kind of customers
            like call centers, small companies , residencial customers
            and other carriers, so we realy want to reach a high number
            of calls with opensips, but 750 cps is diferent than
            simultaneos calls (i think), i will check if we are getting
            some kind of DOS attack<br>
            <br>
          </div>
          i will change the memory parameters as you suggest.<br>
          <br>
        </div>
        <div>Just one question for you, how you interpret the value
          below as 750 cps ? <br>
          <br>
          shmem:used_size = 3401120<br>
          shmem:max_used_size = 226816344<br>
          <br>
        </div>
        <br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">2014-03-04 11:16 GMT-05:00 Liviu Chircu
          <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:liviu@opensips.org" target="_blank">liviu@opensips.org</a>&gt;</span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <div>Hello Mike,<br>
                <br>
                MySQL data looks like peanuts. We can safely ignore it.
                The following stats are quite interesting:<br>
                <br>
                shmem:used_size = 3401120<br>
                shmem:max_used_size = 226816344<br>
                <br>
                From the <b>tm</b> module's point of view, this means
                that your server was hit, at some point in time, by a
                traffic of over 750 transactions/sec! If we add the
                memory consumption of other modules (dialog, usrloc),
                and a more aggressive peak hour, it may be quite normal
                for memory consumption to reach 1GB!<br>
                <br>
                Can you share some details about the nature of your
                traffic? Do you expect traffic of over 750 cps
                regularly? If yes, then:<br>
                <br>
                * -m 7192 is a good idea. You can probably reduce it a
                bit, like 4096.<br>
                * <u>-M 512 is too much</u>. 64MB should be more than
                enough for an OpenSIPS listener on <b>any</b> scenario.<br>
                <br>
                If you don't expect such traffic, then it looks like a
                denial of service attack, case in which you should look
                into the <b>ratelimit</b> module.
                <div class=""><br>
                  <br>
                  Best regards,<br>
                  <pre cols="72">Liviu Chircu
OpenSIPS Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                </div>
                <div>
                  <div class="h5"> On 03/04/2014 03:43 PM, Mike Tesliuk
                    wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div class="h5">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>
                            <div>
                              <div>Hello Liviu, <br>
                                <br>
                              </div>
                              The address table have 110 records, and
                              the subscriber have 1738 records, i have
                              342 users registered<br>
                              <br>
                            </div>
                            and im using the loadbalancer with 10
                            records<br>
                            <br>
                          </div>
                          About recompile yes, i can recompile, i
                          already have done this before&nbsp; , you said that
                          the logs that i send was ok, nothing like a
                          memory leak, but i can do, as i told you i
                          change the memory parameteres as you can see
                          below<br>
                          <br>
                          /usr/local/opensips/sbin/opensips -P
                          /var/run/opensips.pid -f
                          /etc/opensips/opensips.cfg -m 7168 -M 512<br>
                          <br>
                          <br>
                        </div>
                        im running now since March 1st&nbsp; .<br>
                        <br>
                      </div>
                      Right now my fifo get_statistics show me<br>
                      <br>
                      shmem:total_size = 7516192768<br>
                      shmem:used_size = 3401120<br>
                      shmem:real_used_size = 46974408<br>
                      shmem:max_used_size = 226816344<br>
                      shmem:free_size = 7469218360<br>
                      shmem:fragments = 449173<br>
                      <br>
                      pkmem:0-total_size = 536870912<br>
                      pkmem:0-used_size = 105424<br>
                      pkmem:0-real_used_size = 412856<br>
                      pkmem:0-max_used_size = 555464<br>
                      pkmem:0-free_size = 536458056<br>
                      pkmem:0-fragments = 3<br>
                      pkmem:1-total_size = 0<br>
                      pkmem:1-used_size = 0<br>
                      pkmem:1-real_used_size = 0<br>
                      pkmem:1-max_used_size = 0<br>
                      pkmem:1-free_size = 536442160<br>
                      pkmem:1-fragments = 0<br>
                      pkmem:2-total_size = 536870912<br>
                      pkmem:2-used_size = 133888<br>
                      pkmem:2-real_used_size = 480680<br>
                      pkmem:2-max_used_size = 555464<br>
                      pkmem:2-free_size = 536390232<br>
                      pkmem:2-fragments = 307<br>
                      pkmem:3-total_size = 536870912<br>
                      pkmem:3-used_size = 122928<br>
                      pkmem:3-real_used_size = 441400<br>
                      pkmem:3-max_used_size = 555464<br>
                      pkmem:3-free_size = 536429512<br>
                      pkmem:3-fragments = 109<br>
                      pkmem:4-total_size = 536870912<br>
                      pkmem:4-used_size = 122928<br>
                      pkmem:4-real_used_size = 441496<br>
                      pkmem:4-max_used_size = 555464<br>
                      pkmem:4-free_size = 536429416<br>
                      pkmem:4-fragments = 110<br>
                      pkmem:5-total_size = 536870912<br>
                      pkmem:5-used_size = 123080<br>
                      pkmem:5-real_used_size = 457584<br>
                      pkmem:5-max_used_size = 555464<br>
                      pkmem:5-free_size = 536413328<br>
                      pkmem:5-fragments = 276<br>
                      pkmem:6-total_size = 536870912<br>
                      pkmem:6-used_size = 123088<br>
                      pkmem:6-real_used_size = 460184<br>
                      pkmem:6-max_used_size = 555464<br>
                      pkmem:6-free_size = 536410728<br>
                      pkmem:6-fragments = 303<br>
                      pkmem:7-total_size = 536870912<br>
                      pkmem:7-used_size = 103360<br>
                      pkmem:7-real_used_size = 408680<br>
                      pkmem:7-max_used_size = 555464<br>
                      pkmem:7-free_size = 536462232<br>
                      pkmem:7-fragments = 4<br>
                      pkmem:8-total_size = 536870912<br>
                      pkmem:8-used_size = 119736<br>
                      pkmem:8-real_used_size = 431584<br>
                      pkmem:8-max_used_size = 555464<br>
                      pkmem:8-free_size = 536439328<br>
                      pkmem:8-fragments = 38<br>
                      <div class="gmail_extra"><br>
                        <br>
                      </div>
                      <div class="gmail_extra">But im not on my peak of
                        use now, is holiday in Brazil so we dont have
                        too much users running <br>
                      </div>
                    </div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <div class="">
                  <pre>_______________________________________________
Devel mailing list
<a moz-do-not-send="true" href="mailto:Devel@lists.opensips.org" target="_blank">Devel@lists.opensips.org</a>
<a moz-do-not-send="true" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
                </div>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            Devel mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel"
              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Devel@lists.opensips.org">Devel@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/devel">http://lists.opensips.org/cgi-bin/mailman/listinfo/devel</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
  </body>
</html>