<div dir="ltr"><div>Hi,</div><div>The number of shmem:fragments reduced by half and the real_used_size is lower as well.</div><div>Thanks<br></div><div class="gmail_quote">On Tue, Sep 11, 2012 at 11:12 AM, Uri Shacked <span dir="ltr"><<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>></span> wrote:<br>
<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">Thanks.<br>
Will it ork on pkg as well?<br>
<div class="im"><br>
On 9/11/12, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> On 9/10/12 2:27 PM, Uri Shacked wrote:<br>
>> thanks a lot.<br>
>> so as i undestand, the real_used_size is the right value to calculate<br>
>> size. but, it grows because of fragmentation data.<br>
>> in the core, what does it mean "It is effective if MEM_JOIN_FREE<br>
>> compile option is defined"<br>
>> is there something else i need to do except adding to the cfg the<br>
>> mem_join=1 ?<br>
> no, iirc MEM_JOIN_FREE is enabled by default -- this is an option to<br>
> turn the feature off at compile time. Let us know if the number of<br>
> fragments is lower.<br>
><br>
> Cheers,<br>
> Daniel<br>
><br>
>><br>
>> On Mon, Sep 10, 2012 at 2:39 PM, Daniel-Constantin Mierla<br>
</div><div class="im">>> <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a> <mailto:<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>>> wrote:<br>
>><br>
>> Hello,<br>
>><br>
>><br>
>> On 9/10/12 1:14 PM, Uri Shacked wrote:<br>
>>><br>
>>> Thanks,<br>
>>><br>
>>> The stuff i sent is from my test server that has 3.3.1 installed.<br>
>>><br>
>>> On my prod servers i use 3.2.x.<br>
>>><br>
>>> how would you explain that when kamailio starts (on prod with<br>
>>> similar data and same cfg) it take around 20% of the shmem, after<br>
>>> reload 30% and in time (6-8 weeks) it gets up to 39% ?<br>
>>><br>
>><br>
>> if used_size does not have variations, then it is no leak. The<br>
>> variations of real_used_size is from fragmentation management --<br>
>> each fragment has a structure associated to it.<br>
>><br>
>> Cheers,<br>
>> Daniel<br>
>><br>
>><br>
>>> I start with 4G of shmem.<br>
>>><br>
>>> It feels like a leak but i have trouble investigating it....<br>
>>> where would you look? The reload, the dialog or the avp's?<br>
>>><br>
>>> BR,<br>
>>><br>
>>> Uri<br>
>>><br>
>>><br>
>>><br>
>>> On Mon, Sep 10, 2012 at 11:06 AM, Daniel-Constantin Mierla<br>
</div><div><div class="h5">>>> <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a> <mailto:<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>>> wrote:<br>
>>><br>
>>> Hello,<br>
>>><br>
>>> the used size is pretty much the same after the reload, so<br>
>>> doesn't look as leak. If you do 2-3 reloads is<br>
>>> shmem:used_size staying around same value?<br>
>>><br>
>>> It is clear boost in the fragments, I would say that after<br>
>>> start the number of fragments is quite low, because it should<br>
>>> contain the good records in memory as well.<br>
>>><br>
>>> Btw, the version 3.3.x has options for defragmentation, see<br>
>>> the core cookbook, you can enable it.<br>
>>><br>
>>> Cheers,<br>
>>> Daniel<br>
>>><br>
>>><br>
>>><br>
>>> On 9/9/12 10:18 AM, Uri Shacked wrote:<br>
>>>> Hi,<br>
>>>> here is the statistics after kamailio starts:<br>
>>>> shmem:fragments = 28<br>
>>>> shmem:free_size = 3800871312<br>
>>>> shmem:max_used_size = 494132368<br>
>>>> shmem:real_used_size = 494095984<br>
>>>> shmem:total_size = 4294967296<br>
>>>> shmem:used_size = 342642072<br>
>>>> here it is after reload of the num table:<br>
>>>> shmem:fragments = 9161531<br>
>>>> shmem:free_size = 3654274496<br>
>>>> shmem:max_used_size = 959885552<br>
>>>> shmem:real_used_size = 640692800<br>
>>>> shmem:total_size = 4294967296<br>
>>>> shmem:used_size = 342654552<br>
>>>> here is the cfg part for mtree:<br>
>>>> #------- mtree params -------------<br>
>>>> modparam("mtree", "db_url", CFGDB)<br>
>>>> modparam("mtree", "mtree",<br>
>>>> "name=odr;dbtable=service_odr_view;type=0;")<br>
>>>> modparam("mtree", "mtree",<br>
>>>> "name=oper;dbtable=service_oper_type;type=0;")<br>
>>>> modparam("mtree", "mtree",<br>
>>>> "name=permis;dbtable=service_permisions_to_oper;type=0;")<br>
>>>> modparam("mtree", "mtree",<br>
>>>> "name=num;dbtable=service_numbers_to_areas_view;type=0;")<br>
>>>> modparam("mtree", "char_list", "0123456789")<br>
>>>> modparam("mtree", "pv_value", "$avp(mtval)")<br>
>>>> modparam("mtree", "pv_values", "$avp(mtvals)")<br>
>>>> here is the number of raws from the DB:<br>
>>>> SELECT count(*) FROM<br>
>>>> `service`.`service_numbers_to_areas_view` = 4195528<br>
>>>> and attached is the memory log.<br>
>>>> thanks,<br>
>>>> Uri<br>
>>>><br>
>>>> On Fri, Sep 7, 2012 at 10:26 AM, Daniel-Constantin Mierla<br>
</div></div><div class="im">>>>> <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a> <mailto:<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>>> wrote:<br>
>>>><br>
>>>> Hello,<br>
>>>><br>
>>>> is this taken only after startup? Get one at startup and<br>
>>>> another one after reload, so it can be compared.<br>
>>>><br>
>>>> Cheers,<br>
>>>> Daniel<br>
>>>><br>
>>>><br>
>>>> On 9/6/12 9:22 AM, Uri Shacked wrote:<br>
>>>>> Hi,<br>
>>>>> here:<br>
>>>>> shmem:fragments = 143898<br>
>>>>> shmem:freesize = 3446570952<br>
>>>>> shmem:max_used_size = 861854768<br>
>>>>> shmem:real_used_size = 848396344<br>
>>>>> shmem:total_size = 4294967296<br>
>>>>> shmem:used_size = 319676976<br>
>>>>><br>
>>>>><br>
>>>>> On Thu, Sep 6, 2012 at 9:49 AM, Daniel-Constantin<br>
</div>>>>>> Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a> <mailto:<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>>><br>
<div class="im">>>>>> wrote:<br>
>>>>><br>
>>>>> Hello,<br>
>>>>><br>
>>>>><br>
>>>>> On 9/5/12 3:06 PM, Uri Shacked wrote:<br>
>>>>><br>
>>>>> Hi,<br>
>>>>> I use MTREE to load 5 million rows from the<br>
>>>>> database. it takes about 30 sec to start<br>
>>>>> kamailio and it is running great.<br>
>>>>> Whern I check the shmem usage I see the data<br>
>>>>> take about 0.8G out of 4G i set on shmem.<br>
>>>>> When i reload the data while kamailio is<br>
>>>>> running, the memory usage rises to 1.3G and<br>
>>>>> stays there (the second and next reloads stays<br>
>>>>> on 1.3G as well).<br>
>>>>> Why doesn't it return to 0.8G after the reload<br>
>>>>> is completed?<br>
>>>>><br>
>>>>><br>
>>>>> can you send the statistics related to shmem?<br>
>>>>><br>
>>>>> kamctl fifo get_statistics shmem:<br>
>>>>><br>
>>>>> There are different values there, some usage come<br>
>>>>> from overhead of memory chunks management.<br>
>>>>><br>
>>>>> Cheers,<br>
>>>>> Daniel<br>
>>>>><br>
>>>>> --<br>
>>>>> Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
>>>>> <a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a><br>
</div>>>>>> <<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#%21/miconda</a>> -<br>
<div class="im">>>>>> <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>
>>>>> Kamailio Advanced Training, Berlin, Nov 5-8, 2012 -<br>
>>>>> <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a><br>
>>>>> Kamailio Advanced Training, Miami, USA, Nov 12-14,<br>
>>>>> 2012 - <a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a><br>
>>>>><br>
>>>>><br>
>>>><br>
>>>> --<br>
>>>> Daniel-Constantin Mierla -<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
>>>> <a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a><br>
</div>>>>> <<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#%21/miconda</a>> -<a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>
<div class="im">>>>> Kamailio Advanced Training, Berlin, Nov 5-8, 2012<br>
</div>>>>> -<a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a><br>
<div class="im">>>>> Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012<br>
>>>> -<a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a><br>
>>>><br>
>>>><br>
>>>><br>
>>><br>
>>> --<br>
>>> Daniel-Constantin Mierla -<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
</div>>>> <a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> <<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#%21/miconda</a>><br>
>>> -<a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>
<div class="im">>>> Kamailio Advanced Training, Berlin, Nov 5-8, 2012<br>
</div>>>> -<a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a><br>
<div class="im">>>> Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012<br>
>>> -<a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a><br>
>>><br>
>>><br>
>><br>
>> --<br>
>> Daniel-Constantin Mierla -<a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
</div>>> <a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> <<a href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#%21/miconda</a>><br>
>> -<a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>
<div class="im">>> Kamailio Advanced Training, Berlin, Nov 5-8, 2012<br>
</div>>> -<a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a><br>
<div class="im">>> Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012<br>
</div>>> -<a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a><br>
<div class="im">>><br>
>><br>
><br>
> --<br>
> Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
> <a href="http://twitter.com/#!/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a><br>
> Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a><br>
> Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 -<br>
> <a href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a><br>
><br>
><br>
<br>
--<br>
</div>Sent from my mobile device<br>
</blockquote></div><br></div>