<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>><i> Hi,
</i>><i> Thanks,
</i>><i> How do i find memory leaks?
</i>><i> when my application starts the it shows the following values:
</i>><i> shmem:fragments = 143898
</i>><i> shmem:freesize = 3446570952
</i>><i> shmem:max_used_size = 861854768
</i>><i> shmem:real_used_size = 848396344
</i>><i> shmem:total_size = 4294967296
</i>><i> shmem:used_size = 319676976
</i>><i> I divided the "real_used_size" with the "total_size" and notice that
</i>><i> it is 20%. So, this is my initial value of the application.
</i>><i> After 2 months with 40,000 calls per day, the relations between these
</i>><i> values is 39%. (doing a reload of the data that occupies 20% failed
</i>><i> due to "no memory")
</i>><i> So, 19% occupation of memory is normal for this amount of calls? or is
</i>><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's normal, if you don'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>><i> Uri
</i>><i> On 09/05/2012 10:19 AM, Uri Shacked wrote:
</i>><i> >/Hi, />/When I start kamailio it loads some data into memory. />/Now
</i>><i> calls are starting to gather up. How can I check how mach memory
</i>><i> />/does my avp's take? />/BR, />/Uri /Hello Uri,
</i>><i>
</i>><i> avp's are associated with the transactions, so they free'd when the
</i>><i> transaction stops(and calls are composed of transactions). This is true
</i>><i> for dialog information as well (dlg_var's etc.). Continuous growth in
</i>><i> memory at a constant call rate (incoming sip requests) might mean a
</i>><i> leak. If you need statistics about the total memory usage you can use
</i>><i> `kamctl fifo get_statistics all` and check for the shmem real_used_size
</i>><i> and max_used_size fields.
</i>><i>
</i>><i> Cheers,
</i>><i> Marius
</i>><i>
</i>><i> --
</i>><i> Zbihlei Marius
</i>><i>
</i>><i> Head of
</i>><i> Linux Development Services Romania
</i>><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&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>