<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>the registrations are done each timer interval as soon as
      init_time + reg_delay > crt_timer. As you have reg_delay spread
      across 60sec and the timer run each 60sec, very likely all of them
      are done at once or sometimes in two timer callback executions.</p>
    <p>You have to set the timer interval to a lower value, try with 5
      or 10 seconds and see the results.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 16.08.17 10:02, Ivo Vastert wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPo3bdh3_rHh40Pa0oBkUUH_epbrxVdHxn8ueFkj_8mebJH9cQ@mail.gmail.com">
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>We're currently using 60 as well there:</div>
        <div>
          <p class="gmail-p1"><span class="gmail-s1">modparam("uac",
              "reg_timer_interval", 60)</span></p>
          <p class="gmail-p1"><span class="gmail-s1"><br>
            </span></p>
          <p class="gmail-p1"><span class="gmail-s1">Br,</span></p>
          <p class="gmail-p1">Ivo<br>
          </p>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Aug 16, 2017 at 8:22 AM,
          Daniel-Constantin Mierla <span dir="ltr"><<a
              href="mailto:miconda@gmail.com" target="_blank"
              moz-do-not-send="true">miconda@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <p>Hello,</p>
              <p>I asked about reg_timer_interval parameter.</p>
              <p>Cheers,<br>
                Daniel<br>
              </p>
              <div>
                <div class="h5"> <br>
                  <div class="m_5305477885981309682moz-cite-prefix">On
                    16.08.17 01:32, Ivo Vastert wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div class="m_5305477885981309682Xi"
                      style="color:rgb(34,34,34);font-size:14px">
                      <div class="m_5305477885981309682Yi"
                        style="height:66px">
                        <div class="m_5305477885981309682ki"
                          style="height:66px">
                          <div class="m_5305477885981309682ti
                            m_5305477885981309682ui
                            m_5305477885981309682ji" dir="ltr">
                            <div dir="ltr">Hi,
                              <div><br>
                              </div>
                              <div>We are currently using 60:</div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="m_5305477885981309682Xi"
                      style="color:rgb(34,34,34);font-size:14px">
                      <div class="m_5305477885981309682Yi"
                        style="height:80px">
                        <div class="m_5305477885981309682ki"
                          style="height:80px">
                          <div class="m_5305477885981309682ti
                            m_5305477885981309682wi
                            m_5305477885981309682ji" dir="ltr">
                            <div><br>
                            </div>
                            <div><span
                                style="font-size:12.800000190734863px">modparam("uac",
                                "reg_random_delay", 60)</span></div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <br>
                    On Tuesday, August 15, 2017, Daniel-Constantin
                    Mierla <<a href="mailto:miconda@gmail.com"
                      target="_blank" moz-do-not-send="true">miconda@gmail.com</a>>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div text="#000000" bgcolor="#FFFFFF">
                        <p>Hello,</p>
                        <p>what is the value for reg_timer_interval
                          parameter?</p>
                        <p>Cheers,<br>
                          Daniel<br>
                        </p>
                        <br>
                        <div>On 15.08.17 12:54, Ivo Vastert wrote:<br>
                        </div>
                        <blockquote type="cite">
                          <div dir="ltr"><span
                              style="font-size:12.800000190734863px">Hi,</span>
                            <div style="font-size:12.800000190734863px"><br>
                            </div>
                            <div style="font-size:12.800000190734863px">I'm
                              using the UAC module in Kamailio to setup
                              about 500 outbound registration towards a
                              single host.</div>
                            <div style="font-size:12.800000190734863px">The
                              issue I'm currently experiencing is that
                              when we start Kamailio all this 500
                              registrations are initiated at once
                              towards the host which can't handle all
                              the requests at the same time.</div>
                            <div style="font-size:12.800000190734863px"><br>
                            </div>
                            <div style="font-size:12.800000190734863px">Therefor
                              I tried to spread the registrations using
                              the reg_random_delay function:</div>
                            <div style="font-size:12.800000190734863px">modparam("uac",
                              "reg_random_delay", 60)<br>
                            </div>
                            <div style="font-size:12.800000190734863px"><br>
                            </div>
                            <div style="font-size:12.800000190734863px">I
                              would expect that this would spread the
                              registrations over about a minute but in
                              reality the registrations are spread as
                              follow:</div>
                            <div style="font-size:12.800000190734863px"><br>
                            </div>
                            <div><span
                                style="font-size:12.800000190734863px">Startt</span><span
                                style="font-size:small">ime /
                                Registrations</span><br>
                            </div>
                            <div>
                              <div>21:59:14<span style="white-space:pre-wrap">    </span>151</div>
                              <div>21:59:15<span style="white-space:pre-wrap">    </span>166</div>
                              <div>21:59:16<span style="white-space:pre-wrap">    </span>127</div>
                              <div>21:59:18<span style="white-space:pre-wrap">    </span>60</div>
                              <div>21:59:22<span style="white-space:pre-wrap">    </span>35</div>
                            </div>
                            <div><br>
                            </div>
                            <div>So Kamailio is started at 21:59:14 and
                              initiates 151 registrations,</div>
                            <div>1 second after start another 166</div>
                            <div>2 seconds after start another 127</div>
                            <div>4 seconds after start another 60</div>
                            <div>8 seconds after start the last 35</div>
                            <div><br>
                            </div>
                            <div>In reality it looks like some increment
                              is applied instead of calculating a random
                              starting offset for each outbound
                              registration?</div>
                            <div>Is there any solutions to this issue
                              available?<br>
                            </div>
                            <div><br>
                            </div>
                            <div>Best regards,</div>
                            <div><br>
                            </div>
                            <div>Ivo Vastert</div>
                          </div>
                          <br>
                          <fieldset></fieldset>
                          <br>
                          <pre>______________________________<wbr>_________________
Kamailio (SER) - Users Mailing List
<a moz-do-not-send="true">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" moz-do-not-send="true">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a>
</pre>
                        </blockquote>
                        <br>
                        <pre cols="72">-- 
Daniel-Constantin Mierla
<a href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
Kamailio World Conference - <a href="http://www.kamailioworld.com" target="_blank" moz-do-not-send="true">www.kamailioworld.com</a></pre>
                      </div>
                    </blockquote>
                  </blockquote>
                  <br>
                  <pre class="m_5305477885981309682moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="m_5305477885981309682moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank" moz-do-not-send="true">www.twitter.com/miconda</a> -- <a class="m_5305477885981309682moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank" moz-do-not-send="true">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="m_5305477885981309682moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank" moz-do-not-send="true">www.asipto.com</a>
Kamailio World Conference - <a class="m_5305477885981309682moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank" moz-do-not-send="true">www.kamailioworld.com</a></pre>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>