<div dir="ltr">I've increased shared memory to 2Gb (-M 16 -m 2048). The free_size parameter was not less than 793Mb during the test. It seems that 2Gb is an optimal value for my setting.<div><br></div><div>Daniel,</div><div>Yes, you're right. That was not a memory leak, I think that this is about amount of memory required by kamailio for the specific test case.</div><div><br></div><div>Thanks,</div><div>Andrey</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-01-12 7:42 GMT-05:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>My understanding is that used memory goes back to normal after
the test, not something that stays high forever, so it doesn't
look at all with what you refer to.</p>
<p>Cheers,<br>
Daniel<br>
</p><div><div class="h5">
<br>
<div class="m_4401635166774950362moz-cite-prefix">On 12.01.18 11:13, Olle E. Johansson
wrote:<br>
</div>
<blockquote type="cite">
Andrey,
<div>Can you please run “kamcmd tm.stats” and check the
values. I have a similar problem and see clearly</div>
<div>a lot of transactions not being freed, eating up
memory and ending with out of memory messages in the log.</div>
<div>Have an open issue about it in the bug tracker.</div>
<div><br>
</div>
<div>/O</div>
<div><br>
<div>
<blockquote type="cite">
<div>On 12 Jan 2018, at 11:10, Daniel-Constantin
Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:</div>
<br class="m_4401635166774950362Apple-interchange-newline">
<div>
<div text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>if you run with 512MB, is the shm free
getting to 1.8MB as well for same figures of
registrations and calls?</p>
<p>Cheers,<br>
Daniel<br>
</p>
<br>
<div class="m_4401635166774950362moz-cite-prefix">On 12.01.18 09:19, Andrey
Deykunov wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>We use kamailio as a router in our PBX
server. The test below causes significant
decreasing of free shared memory and </div>
<div>many "out of memory" errors in
kamailio log:</div>
<div><br>
</div>
<div>Preconditions: kamailio server with
256Mb of shared memory allocated.</div>
<div><br>
</div>
<div>Test actions: run two load testing
scripts at the same time: </div>
<div> 1) 10000 register operations;</div>
<div> 2) 20000 calls (about 300 per sec);</div>
<div><br>
</div>
<div>Results: </div>
<div> 1) memory consumption in peak
values:</div>
<div><span class="m_4401635166774950362gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
- shmem.free_size: 1.8Mb</div>
<div><span class="m_4401635166774950362gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
- core: 120Mb:</div>
<div><span class="m_4401635166774950362gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
- build_req_buf_from_sip_req: 12.5Mb</div>
<div><span class="m_4401635166774950362gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
- msg_lump_cloner: 23.6Mb</div>
<div><span class="m_4401635166774950362gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
- sip_msg_shm_clone: 84Mb</div>
<div><span class="m_4401635166774950362gmail-Apple-tab-span" style="white-space:pre-wrap"> </span>
- tm module: 118Mb</div>
<div> 2) shmem.free_size parameter back
to normal after the test, so it could be concluded
that we don't have any memory leaks.</div>
<div><br>
</div>
<div>Is it normal behavior or it's possible
to do something to increase performance?</div>
<div><br>
</div>
<div>PS: the same behaviour occurs for
various values of shared memory defined at the
start of kamailio server (128Mb, 256Mb, 512Mb
etc.).</div>
<div><br>
</div>
<div>Thank you,</div>
<div>Andrey</div>
</div>
<br>
<fieldset class="m_4401635166774950362mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
Kamailio (SER) - Users Mailing List
<a class="m_4401635166774950362moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_4401635166774950362moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a>
</pre>
</blockquote>
<br>
<pre class="m_4401635166774950362moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="m_4401635166774950362moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_4401635166774950362moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - March 5-7, 2018, Berlin - <a class="m_4401635166774950362moz-txt-link-abbreviated" href="http://www.asipto.com/" target="_blank">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="m_4401635166774950362moz-txt-link-abbreviated" href="http://www.kamailioworld.com/" target="_blank">www.kamailioworld.com</a></pre>
</div>
______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a class="m_4401635166774950362moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="m_4401635166774950362moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="m_4401635166774950362moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_4401635166774950362moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - March 5-7, 2018, Berlin - <a class="m_4401635166774950362moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
Kamailio World Conference - May 14-16, 2018 - <a class="m_4401635166774950362moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
</div></div></div>
</blockquote></div><br></div>