<div dir="ltr"><br><div class="gmail_quote"><blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" class="gmail_quote"><div dir="ltr">
<div>The 20% initialy loaded is because I load many data with MTREE, HTABLE,DIALPLAN etc....(5 million rows with MTREE..)</div><div>Regarding the PKG, how do i set it? I read a few months ago that the shared and private memory on version 3.2.2 are the same.</div>

<div>Thanks for the help :-)</div><div> </div><div>On 09/05/2012 11:44 AM, Uri Shacked wrote:<br>&gt;<i> Hi,
</i>&gt;<i> Thanks,
</i>&gt;<i> How do i find memory leaks?
</i>&gt;<i> when my application starts the it shows the following values:
</i>&gt;<i> shmem:fragments = 143898
</i>&gt;<i> shmem:freesize = 3446570952
</i>&gt;<i> shmem:max_used_size = 861854768
</i>&gt;<i> shmem:real_used_size = 848396344
</i>&gt;<i> shmem:total_size = 4294967296
</i>&gt;<i> shmem:used_size = 319676976
</i>&gt;<i> I divided the &quot;real_used_size&quot; with the &quot;total_size&quot; and notice that 
</i>&gt;<i> it is 20%. So, this is my initial value of the application.
</i>&gt;<i> After 2 months with 40,000 calls per day, the relations between these 
</i>&gt;<i> values is 39%. (doing a reload of the data that occupies 20% failed 
</i>&gt;<i> due to &quot;no memory&quot;)
</i>&gt;<i> So, 19% occupation of memory is normal for this amount of calls? or is 
</i>&gt;<i> it a memory leak? if it is a memeory leak, how do i see where?
</i>Hello,<br><br>Too little information to go on here. A reload might fail mostly because <br>data from the DB (e.g. with carrierroute case) is first loaded into <br>private memory (the sql result). Depending of the module there are other <br>

tricks you could do (decrease the number of fetch rows the query returns <br>etc.). The out of memory condition affects shared or private mem. Try to <br>use at least 15 MB for PKG mem.<br><br>If the 39% is with traffic, then it&#39;s normal, if you don&#39;t have any <br>

traffic I still would not worry. The thing that worries me a little is <br>the value, you are using from the start around 0.8 GB of used shared <br>memory... this is a lot. From the percentages you provided it looks ok....<br>

<br>Marius<br>&gt;<i> Uri
</i>&gt;<i> On 09/05/2012 10:19 AM, Uri Shacked wrote:
</i>&gt;<i> &gt;/Hi, /&gt;/When I start kamailio it loads some data into memory. /&gt;/Now 
</i>&gt;<i> calls are starting to gather up. How can I check how mach memory 
</i>&gt;<i> /&gt;/does my avp&#39;s take? /&gt;/BR, /&gt;/Uri /Hello Uri,
</i>&gt;<i>
</i>&gt;<i> avp&#39;s are associated with the transactions, so they free&#39;d when the
</i>&gt;<i> transaction stops(and calls are composed of transactions). This is true
</i>&gt;<i> for dialog information as well (dlg_var&#39;s etc.). Continuous growth in
</i>&gt;<i> memory at a constant call rate (incoming sip requests) might mean a
</i>&gt;<i> leak. If you need statistics about the total memory usage you can use
</i>&gt;<i> `kamctl fifo get_statistics all` and check for the shmem real_used_size
</i>&gt;<i> and max_used_size fields.
</i>&gt;<i>
</i>&gt;<i> Cheers,
</i>&gt;<i> Marius
</i>&gt;<i>
</i>&gt;<i> -- 
</i>&gt;<i> Zbihlei Marius
</i>&gt;<i>
</i>&gt;<i> Head of
</i>&gt;<i> Linux Development Services Romania
</i>&gt;<i>
</i><br><span class="HOEnZb"><font color="#888888"><br>-- <br>Zbihlei Marius<br><br>Head of<br>Linux Development Services Romania<br><br>1&amp;1 Internet Development srl    Tel KA: 754-9152<br>Str Mircea Eliade 18            Tel RO: <a href="tel:%2B40-31-223-9152" target="_blank" value="+40312239152">+40-31-223-9152</a><br>
Sect 1, Bucuresti               mailto: <a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">marius.zbihlei at 1and1.ro</a><br>
71295, Romania<br><br></font></span></div></div>
</blockquote></div><br></div>