<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 08/09/14 23:22, Luis Azedo wrote:<br>
    </div>
    <blockquote
cite="mid:CAEvFzR9su48e0CyozRXcNVviPdL5kdH92jFEzaLdCzEuFCjK+w@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Daniel,
        <div><br>
        </div>
        <div>i'm running a build from master</div>
        <div><br>
        </div>
        <div>
          <div>Process::  ID=51 PID=7478 Type=slow timer</div>
          <div>Process::  ID=52 PID=7479 Type=timer</div>
        </div>
        <div><br>
        </div>
        <div>memory from top </div>
        <div>
          <div> 7479 kamailio  20   0 1224m  <b>72m 5464 </b>S  0.3
             1.9   0:00.68 kamailio</div>
          <div> 7478 kamailio  20   0 1224m  <b>80m  13m </b>S  0.0
             2.1   0:00.71 kamailio</div>
        </div>
        <div><br>
        </div>
        <div>package and shared memory and constantly increasing on
          these processes when i use the dbtext from master without the
          proposed patch.</div>
      </div>
    </blockquote>
    usage of pkg and shm by db_text is not reflected by 'top' command
    line tool. Kamailio allocates the full size of pkg and shm zones at
    startup, then it does management of chunk allocations internally --
    it has its own memory manager.<br>
    <br>
    If you see increase of used memory via 'top' tool, then it is a leak
    in either an external library used for a module in that
    configuration or a module that has enabled use of system malloc
    (there are just few of them, mostly those related to MI/RPC, such as
    xmlrpc, ctl).<br>
    <br>
    To look at used memory inside kamailio, use:<br>
    <br>
    kamcmd pkg.stats<br>
    kamctl stats shmem<br>
    <br>
    You can recompile and reinstall kamailio with:<br>
    <br>
    MEMMNG=1<br>
    MEMDBG=1<br>
    <br>
    Then set:<br>
    <br>
    memlog=1<br>
    mem_summary=12<br>
    <br>
    in kamailio.cfg and restart, let kamailio to run for a while until
    you think the leak has made some effects. Stop kamailio and you
    should see a summary with the used chunks of memory printed to
    syslog. You can send all those log messages to me to check if there
    is a leak in pkg or shm managed by kamailio. A leak is indicated by
    a high number of chunks allocated from same place, but you should
    filter out those allocated at startup (eg., parsing the cfg).<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany</pre>
  </body>
</html>