<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Please Open a jira... this is the second report I have heard of this issue.<div><br></div><div>/b</div><div><br><div><div>On Aug 6, 2009, at 4:29 PM, Cooper Xu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; ">Hi,<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" color="navy" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">In our load test, we found that the new RTP auto_flush and hot_socket code after version 1.<font color="navy"><span style="color: navy; ">0</span></font>4<span class="Apple-converted-space">&nbsp;</span><font color="navy"><span style="color: navy; ">seems to<span class="Apple-converted-space">&nbsp;</span></span></font>cause voice quality problem. We were stress testing Freeswitch with 250 channels using codec G.711u and iLBC. &nbsp;The RTP auto_flush<span class="Apple-converted-space">&nbsp;</span><font color="navy"><span style="color: navy; ">appear</span></font>ed to be trigged<span class="Apple-converted-space">&nbsp;</span><font color="navy"><span style="color: navy; ">very<span class="Apple-converted-space">&nbsp;</span></span></font>frequently.<o:p></o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; "><o:p>&nbsp;</o:p></span></font></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman'; "><font size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; ">Because our system is under load and socket buffer<span class="Apple-converted-space">&nbsp;</span><font color="navy"><span style="color: navy; ">for RTP stream<span class="Apple-converted-space">&nbsp;</span></span></font>sometimes accumulate<font color="navy"><span style="color: navy; ">d</span></font><span class="Apple-converted-space">&nbsp;</span>a few packets before the channel can handle it. When this happened, the RTP auto_flush and hot_socket mechanism seem<font color="navy"><span style="color: navy; ">ed</span></font><span class="Apple-converted-space">&nbsp;</span>sending<span class="Apple-converted-space">&nbsp;</span><font color="navy"><span style="color: navy; ">those<span class="Apple-converted-space">&nbsp;</span></span></font>accumulated packets in a very short interval. However<span class="Apple-converted-space">&nbsp;</span><font color="navy"><span style="color: navy; ">after this burst, the RTP stream receiving will wait for 80-100ms before receiving and sending another RTP packet. To find out why this can happen, We looked at the RTP part of Freeswitch code and found<span class="Apple-converted-space">&nbsp;</span></span></font>th<font color="navy"><span style="color: navy; ">at</span></font><span class="Apple-converted-space">&nbsp;</span><font color="navy"><span style="color: navy; ">inside the RTP read, during auto RTP flush, it will call<span class="Apple-converted-space">&nbsp;</span></span></font>switch_core_timer_sync()&nbsp; function<font color="navy"><span style="color: navy; ">.</span></font><span class="Apple-converted-space">&nbsp;</span><font color="navy"><span style="color: navy; ">This will</span></font><span class="Apple-converted-space">&nbsp;</span>add 3 to the timer reference count and the next switch_core_timer_next() call will add another 1 to timer reference. This caused the next RTP receiving being delayed 80-100ms. This 80-100ms delay for RTP receiving caused 4-5 packets being accumulated in socket buffer again. And it will soon trigger another auto_flush for RTP stream. As the result, we saw a lot of short burst in the RTP stream, which caused voice quality problem.</span></font></div></span></blockquote></div><br></div></body></html>