<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I am having the same issue on version 4.0.4<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'> sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] <b>On Behalf Of </b>Uri Shacked<br><b>Sent:</b> Thursday, December 5, 2013 9:30 AM<br><b>To:</b> Daniel-Constantin Mierla<br><b>Cc:</b> SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List<br><b>Subject:</b> Re: [SR-Users] reload to memory is much slower and has problms after upgrade to 3.3.2 and using mem_join=1<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>The version is 3.3.2 a91b2b-dirty<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>The cpmmand output is:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>shmem:fragments = 433<o:p></o:p></p></div><div><div><p class=MsoNormal>shmem:free_size = 2595411760<o:p></o:p></p></div><div><div><p class=MsoNormal>shmem:max_used_size = 2358563728<o:p></o:p></p></div><div><div><p class=MsoNormal>shmem:real_used_size = 1699555536<o:p></o:p></p></div><div><div><p class=MsoNormal>shmem:total_size = 4294967296<o:p></o:p></p></div><div><div><p class=MsoNormal>shmem:used_size = 1359869056<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Thanks<o:p></o:p></p></div></div></div></div></div></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On Wed, Dec 4, 2013 at 10:04 PM, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><p class=MsoNormal>To refresh, what is the version you are using now? Looking at old messages in this thread is about 3.3.2, but memjoin was not there, iirc.<br><br>Can you give the output for next command?<br><br>kamctl mi get_statistics shmem:<br><br>You can walk the shared memory chunks with gdb, but it may take quite a while and not sure how useful will be.<br><br>Cheers,<br>Daniel<o:p></o:p></p><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On 12/4/13 8:29 PM, Uri Shacked wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>Any ideas?<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On Tue, Nov 26, 2013 at 9:38 AM, Uri Shacked <<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div><p class=MsoNormal>mem_join=1 on cfg.<o:p></o:p></p></div><div><p class=MsoNormal>MEMDBG=0 on makefile.def<o:p></o:p></p></div></div><div><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On Mon, Nov 25, 2013 at 10:40 PM, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><p class=MsoNormal>Hello,<br><br>are you still using mem_join=1?<br><br>Cheers,<br>Daniel <o:p></o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On 11/24/13 10:01 AM, Uri Shacked wrote:<o:p></o:p></p></div></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'>Hi,</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'>It has been a while.</span><o:p></o:p></p><div><div><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'>Still, I have some problems with reloading data into shared memory.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'>I can obviously notice that there is always an increase of shmem after each reload.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'>When my system starts, it has 4G of memory reserved and approximately 0.8G is populated at start.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'>After 30 days, when reloading 15-25 times per day only part of the 0.8G, the shmem size is approximately 3.5G.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'>As I mentioned before, the traffic does not seems to be the issue. How do I, or can I, check the size of memory occupied by traffic only?</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'>Any ideas how to handle the reloads? </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'>I am using kamailio 3.3.2 with modules like ACC, DIALOG, CARRIERROUTE and more….</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:black'> </span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:10.0pt'><span style='font-family:"Arial","sans-serif";color:black'>Thanks,</span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:10.0pt'><span style='font-family:"Arial","sans-serif";color:black'>BR,</span><o:p></o:p></p><p class=MsoNormal style='margin-bottom:10.0pt'><span style='font-family:"Arial","sans-serif";color:black'>Uri</span><o:p></o:p></p></div></div></div><div><div><div><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><div><p class=MsoNormal>On Sun, Mar 3, 2013 at 7:36 PM, Uri Shacked <<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div><p class=MsoNormal><br>Hi,<o:p></o:p></p><p class=MsoNormal>I have this memory issue again.<o:p></o:p></p><p class=MsoNormal>The status now is that I compiled kamailio as followed here and use mem_join=1.<o:p></o:p></p><p class=MsoNormal>I reload my data from DB every minute! I know i reload a lot, will take care of that (will update you all on April :-)). <o:p></o:p></p><p class=MsoNormal>When kamailio starts the shmem is about 17% of 4Gb and after 7 days (600 reloads per day) the shmem is about 24%.<o:p></o:p></p><p class=MsoNormal>The traffic is not the issue.<o:p></o:p></p><p class=MsoNormal>Still, can defrag of memory improve? Ideas for defrag?<o:p></o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal style='margin-bottom:6.0pt'>Uri<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p></div><div><div><div><p class=MsoNormal>On Tue, Nov 27, 2012 at 12:37 PM, Uri Shacked <<a href="mailto:ushacked@gmail.com" target="_blank">ushacked@gmail.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'><div><div><p class=MsoNormal><br>OK<o:p></o:p></p></div><div><div><p class=MsoNormal>>>ok - it's 56sec or 36sec?<o:p></o:p></p></div></div><div><p class=MsoNormal>It was 56 sec.<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>Now, after recompile, when cfg mem_join=0 the reload takes 8 sec and the shmem real used is 25% of 4Gb.<o:p></o:p></p></div><div><p class=MsoNormal>When mem_join=, the reload take 30 sec and the shmem real used is 17%.<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>Looks good with mem_join=1.<o:p></o:p></p></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>Thanks,<o:p></o:p></p></div><div><p class=MsoNormal>Uri<o:p></o:p></p></div></div></blockquote></div></div></div></div></blockquote></div></div></div></div></div></blockquote><p class=MsoNormal><o:p> </o:p></p><div><pre>-- <o:p></o:p></pre><pre>Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><o:p></o:p></pre><pre><a href="http://twitter.com/#%21/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><o:p></o:p></pre></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></blockquote><p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p><pre>-- <o:p></o:p></pre><pre>Daniel-Constantin Mierla - <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><o:p></o:p></pre><pre><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><o:p></o:p></pre></div></div></div></blockquote></div><p class=MsoNormal><o:p> </o:p></p></div></div></body></html>