<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
<div class="moz-cite-prefix">On 9/10/12 1:14 PM, Uri Shacked wrote:<br>
</div>
<blockquote
cite="mid:CAMMbDhRecTys5PZRqBODYa+3HPFukfaaYUjVwRRoby+6fGQ=Ew@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><font face="Times New Roman" size="3">
</font>
<p style="margin:0cm 0cm 0pt;line-height:normal"
class="MsoNormal"><span style="font-family:"Times New
Roman","serif";font-size:12pt">Thanks,</span></p>
<font face="Times New Roman" size="3">
</font>
<p style="margin:0cm 0cm 0pt;line-height:normal"
class="MsoNormal"><span style="font-family:"Times New
Roman","serif";font-size:12pt">The stuff i
sent is from my test
server that has 3.3.1 installed.</span></p>
<font face="Times New Roman" size="3">
</font>
<p style="margin:0cm 0cm 0pt;line-height:normal"
class="MsoNormal"><span style="font-family:"Times New
Roman","serif";font-size:12pt">On my prod
servers i use 3.2.x.</span></p>
<font face="Times New Roman" size="3">
</font>
<p style="margin:0cm 0cm 0pt;line-height:normal"
class="MsoNormal"><span style="font-family:"Times New
Roman","serif";font-size:12pt">how would
you explain that when
kamailio starts (on prod with similar data and same cfg)
it take around 20% of
the shmem, after reload 30% and in time (6-8 weeks) it
gets up to 39% ?</span></p>
</div>
</div>
</blockquote>
<br>
if used_size does not have variations, then it is no leak. The
variations of real_used_size is from fragmentation management --
each fragment has a structure associated to it.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:CAMMbDhRecTys5PZRqBODYa+3HPFukfaaYUjVwRRoby+6fGQ=Ew@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><font face="Times New Roman" size="3">
</font>
<p style="margin:0cm 0cm 0pt;line-height:normal"
class="MsoNormal"><span style="font-family:"Times New
Roman","serif";font-size:12pt">I start with
4G of shmem.</span></p>
<font face="Times New Roman" size="3">
</font>
<p style="margin:0cm 0cm 0pt;line-height:normal"
class="MsoNormal"><span style="font-family:"Times New
Roman","serif";font-size:12pt">It feels
like a leak but i have trouble
investigating it.... where would you look? The reload, the
dialog or the avp's?</span></p>
<font face="Times New Roman" size="3">
</font>
<p style="margin:0cm 0cm 0pt;line-height:normal"
class="MsoNormal"><span style="font-family:"Times New
Roman","serif";font-size:12pt">BR,</span></p>
<font face="Times New Roman" size="3">
</font>
<p style="margin:0cm 0cm 6pt;line-height:normal"
class="MsoNormal"><span style="font-family:"Times New
Roman","serif";font-size:12pt">Uri</span></p>
<font face="Times New Roman" size="3">
</font><br>
<br>
</div>
<div class="gmail_quote">On Mon, Sep 10, 2012 at 11:06 AM,
Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true" href="mailto:miconda@gmail.com"
target="_blank">miconda@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">
<div bgcolor="#FFFFFF" text="#000000"> Hello,<br>
<br>
the used size is pretty much the same after the reload, so
doesn't look as leak. If you do 2-3 reloads is
shmem:used_size staying around same value?<br>
<br>
It is clear boost in the fragments, I would say that after
start the number of fragments is quite low, because it
should contain the good records in memory as well.<br>
<br>
Btw, the version 3.3.x has options for defragmentation,
see the core cookbook, you can enable it.<br>
<br>
Cheers,<br>
Daniel
<div>
<div class="h5"><br>
<br>
<br>
<div>On 9/9/12 10:18 AM, Uri Shacked wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">
<div>Hi,</div>
<div> </div>
<div>here is the statistics after kamailio
starts:</div>
<div> </div>
<div>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</div>
<div> </div>
<div>here it is after reload of the num table:</div>
<div> </div>
<div>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>
</div>
<div>here is the cfg part for mtree:</div>
<div> </div>
<div>#------- mtree params -------------<br>
modparam("mtree", "db_url", CFGDB)<br>
modparam("mtree", "mtree",
"name=odr;dbtable=service_odr_view;type=0;")<br>
modparam("mtree", "mtree",
"name=oper;dbtable=service_oper_type;type=0;")<br>
modparam("mtree", "mtree",
"name=permis;dbtable=service_permisions_to_oper;type=0;")<br>
modparam("mtree", "mtree",
"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)")</div>
<div> </div>
<div>here is the number of raws from the DB:</div>
<div> </div>
<div>SELECT count(*) FROM
`service`.`service_numbers_to_areas_view` =
4195528</div>
<div> </div>
<div>and attached is the memory log.</div>
<div> </div>
<div>thanks,</div>
<div>Uri</div>
<div>
<div>
<div><br>
</div>
<div class="gmail_quote">On Fri, Sep 7,
2012 at 10:26 AM, Daniel-Constantin
Mierla <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:miconda@gmail.com"
target="_blank">miconda@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">
<div bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
is this taken only after startup?
Get one at startup and another one
after reload, so it can be compared.<br>
<br>
Cheers,<br>
Daniel
<div>
<div><br>
<br>
<div>On 9/6/12 9:22 AM, Uri
Shacked wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi,</div>
<div> </div>
<div>here:</div>
<div> </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><br>
<br>
</div>
<div class="gmail_quote">On
Thu, Sep 6, 2012 at 9:49
AM, Daniel-Constantin
Mierla <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:miconda@gmail.com" target="_blank">miconda@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">Hello,
<div>
<div><br>
<br>
On 9/5/12 3:06 PM,
Uri Shacked 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"> Hi,<br>
I use MTREE to
load 5 million
rows from the
database. it takes
about 30 sec to
start kamailio and
it is running
great.<br>
Whern I check the
shmem usage I see
the data take
about 0.8G out of
4G i set on shmem.<br>
When i reload the
data while
kamailio is
running, the
memory usage rises
to 1.3G and stays
there (the second
and next reloads
stays on 1.3G as
well).<br>
Why doesn't it
return to 0.8G
after the reload
is completed?<br>
</blockquote>
<br>
</div>
</div>
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 from overhead of
memory chunks
management.<br>
<br>
Cheers,<br>
Daniel<span><font
color="#888888"><br>
<br>
-- <br>
Daniel-Constantin
Mierla - <a
moz-do-not-send="true"
href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<a
moz-do-not-send="true"
href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a>
- <a
moz-do-not-send="true"
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
moz-do-not-send="true" href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a><br>
Kamailio Advanced
Training, Miami,
USA, Nov 12-14, 2012
- <a
moz-do-not-send="true"
href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a><br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre cols="72">--
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a moz-do-not-send="true" href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a moz-do-not-send="true" href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a></pre>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</div>
<br>
</div>
</blockquote>
<br>
<pre cols="72">--
Daniel-Constantin Mierla - <a moz-do-not-send="true" href="http://www.asipto.com" target="_blank">http://www.asipto.com</a>
<a moz-do-not-send="true" href="http://twitter.com/#%21/miconda" target="_blank">http://twitter.com/#!/miconda</a> - <a moz-do-not-send="true" href="http://www.linkedin.com/in/miconda" target="_blank">http://www.linkedin.com/in/miconda</a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a moz-do-not-send="true" href="http://asipto.com/u/kat" target="_blank">http://asipto.com/u/kat</a>
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a moz-do-not-send="true" href="http://asipto.com/u/katu" target="_blank">http://asipto.com/u/katu</a></pre>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<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>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat">http://asipto.com/u/kat</a>
Kamailio Advanced Training, Miami, USA, Nov 12-14, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/katu">http://asipto.com/u/katu</a></pre>
</body>
</html>