<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 09/05/2012 11:44 AM, Uri Shacked
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAMMbDhSRPfxiMB-Opu2CjWrranFhAvRnzqai8uzkY-nUEhCkjg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Hi,</div>
        <div>Thanks,</div>
        <div>How do i find memory leaks?</div>
        <div>when my application starts the it shows the following
          values:</div>
        <div>&nbsp;</div>
        <div>shmem:fragments = 143898</div>
        <div>shmem:freesize = 3446570952</div>
        <div>shmem:max_used_size = 861854768</div>
        <div>shmem:real_used_size = 848396344</div>
        <div>shmem:total_size = 4294967296</div>
        <div>shmem:used_size = 319676976</div>
        <div>&nbsp;</div>
        <div>I&nbsp;divided the "real_used_size" with the "total_size" and
          notice that it is 20%. So, this is my initial value of the
          application.</div>
        <div>&nbsp;</div>
        <div>After 2 months with 40,000 calls per day, the relations
          between these values is 39%. (doing a reload of the data that
          occupies 20% failed due to "no memory")</div>
        <div>So,&nbsp;19% occupation of memory&nbsp;is normal for this amount of
          calls? or is it a memory leak? if it is a memeory leak, how do
          i see where?</div>
        <div>&nbsp;</div>
      </div>
    </blockquote>
    Hello, <br>
    <br>
    Too little information to go on here. A reload might fail mostly
    because data from the DB (e.g. with carrierroute case) is first
    loaded into private memory (the sql result). Depending of the module
    there are other tricks you could do (decrease the number of fetch
    rows the query returns etc.). The out of memory condition affects
    shared or private mem. Try to use at least 15 MB for PKG mem.<br>
    <br>
    If the 39% is with traffic, then it's normal, if you don't have any
    traffic I still would not worry. The thing that worries me a little
    is the value, you are using from the start around 0.8 GB of used
    shared memory... this is a lot. From the percentages you provided it
    looks ok.... <br>
    <br>
    Marius<br>
    <blockquote
cite="mid:CAMMbDhSRPfxiMB-Opu2CjWrranFhAvRnzqai8uzkY-nUEhCkjg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Uri</div>
        <div>&nbsp;</div>
        <div>&nbsp;</div>
        <div>&nbsp;</div>
        <div>On 09/05/2012 10:19 AM, Uri Shacked wrote:<br>
          &gt;<i> Hi,
          </i>&gt;<i> When I start kamailio it loads some data into
            memory.
          </i>&gt;<i> Now calls are starting to gather up. How can I
            check how mach memory </i>&gt;<i> does my avp's take?
          </i>&gt;<i> BR,
          </i>&gt;<i> Uri
          </i>Hello Uri,<br>
          <br>
          avp's are associated with the transactions, so they free'd
          when the <br>
          transaction stops(and calls are composed of transactions).
          This is true <br>
          for dialog information as well (dlg_var's etc.). Continuous
          growth in <br>
          memory at a constant call rate (incoming sip requests) might
          mean a <br>
          leak. If you need statistics about the total memory usage you
          can use <br>
          `kamctl fifo get_statistics all` and check for the shmem
          real_used_size <br>
          and max_used_size fields.<br>
          <br>
          Cheers,<br>
          Marius<br>
          <br>
          -- <br>
          Zbihlei Marius<br>
          <br>
          Head of<br>
          Linux Development Services Romania<br>
          <br>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Zbihlei Marius

Head of
Linux Development Services Romania

1&amp;1 Internet Development srl    Tel KA: 754-9152
Str Mircea Eliade 18            Tel RO: +40-31-223-9152
Sect 1, Bucuresti               mailto: <a class="moz-txt-link-abbreviated" href="mailto:marius.zbihlei@1and1.ro">marius.zbihlei@1and1.ro</a>
71295, Romania
</pre>
  </body>
</html>