<div class="gmail_quote"><div>Hi<br><br>thank you for your response.<br><br>Here is my code used for testing the latency <a href="http://pastebin.com/mwHrRDeK">http://pastebin.com/mwHrRDeK</a>.<br>It is based on and built as freeswitch-git/libs/freetdm/src/testapp.c<br>
For the measurement I used a104d card with interconnected spans 1&2.<br>App loads binary file "sample_binin" which was previously created by dumping the E1 channel when there was active call.<br>This dump is used as a source of voice.<br>
App initiates a call on span1. App handles it as incoming call on span2.<br><br>After call is established, measurement loop is entered,measurement is in single thread world, handling the spans 1 & 2 in "serial". <br>
App feeds prebuffered voice to outgoing call on span1 and in paralell makes a dump of written data to binary file "owbinout".<br>At the same time, data read from the span1 are dumped to binary file "orbinout".<br>
Then span2 is handled, data read from the active channel are just written back, here the loopback is created. <br>In paralell data are dumped to file "awbinout"<br><br>So then results are being calculated by comparing the content of :<br>
owbinout against awbinout = one way delay<br>owbinout against orbinout = roundtrip delay<br><br>Personally I use Audacity to import the binary voice, decode it and pair in stereotracks so I can measure the delay.<br><br>With this approach I got the results posted earlier.<br>
<br>With best regards<br><br>Juraj Fabo<br><br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">---------- Forwarded message ----------<br>
From: Moises Silva <<a href="mailto:moises.silva@gmail.com" target="_blank">moises.silva@gmail.com</a>><br>
To: <a href="mailto:freeswitch-dev@lists.freeswitch.org" target="_blank">freeswitch-dev@lists.freeswitch.org</a><br>Date: Mon, 17 Oct 2011 12:22:58 -0400<br>Subject: Re: [Freeswitch-dev] MTU setting and application buffer size<br>
<div class="gmail_quote">
On Tue, Oct 4, 2011 at 8:56 AM, Juraj Fabo <span dir="ltr"><<a href="mailto:juraj.fabo@gmail.com" target="_blank">juraj.fabo@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>> Please, have a look at the results with various parameters used:<br>
> mtu:80 txqueue_size=1 rxqueue_size=1 one-direction delay=60ms<br>
> round-trip delay=120ms<br>
> mtu:80 txqueue_size=2 rxqueue_size=2 one-direction delay=80ms<br>
> round-trip delay=160ms<br>
> mtu:80 txqueue_size=10 rxqueue_size=10 one-direction delay=240ms<br>
> round-trip delay=480ms<br>
> mtu:40 txqueue_size=1 rxqueue_size=1 one-direction delay=40ms<br>
> round-trip delay=80ms<br>
> mtu:40 txqueue_size=2 rxqueue_size=2 one-direction delay=60ms<br>
> round-trip delay=120ms<br>
> mtu:40 txqueue_size=5 rxqueue_size=5 one-direction delay=120ms<br>
> round-trip delay=240ms<br>
> mtu:16 txqueue_size=1 rxqueue_size=1 one-direction delay=30ms<br>
> round-trip delay=60ms<br>
> mtu:8 txqueue_size=1 rxqueue_size=1 one-direction delay=25ms<br>
> round-trip delay=50ms<br>
> mtu:8 txqueue_size=10 rxqueue_size=10 one-direction delay=205ms<br>
> round-trip delay=410ms<br>
><br>
<br>
</div><br>Updated test result with the codec_ms=10 is following:<br>
mtu:16 txqueue_size=1 rxqueue_size=10 one-direction delay=20ms<br>
round-trip delay=50ms<br>
mtu:80 txqueue_size=1 rxqueue_size=10 one-direction delay=56ms<br>
round-trip delay=110ms<br>
<br>
However, this is still not 10ms with the default MTU:80 and codec_ms:10 :(<br>
<br>
Anyway, is it a good idea to use so assymetric tx/rx queue sizes?<br>
<br>
</blockquote><div><br></div><div>In general I don't think is a good idea because 99% of the user population is using default symmetric queues, moving to obscure/rarely-tested configurations increases your likelihood of facing problems. Having said that, I don't see why it should not work :-)</div>
<div><br></div><div>Can you share the code you're using to measure latency? may be setup a git repo in github with your code?</div><div><br></div><div><table style="width:486.3pt;border-collapse:collapse" border="0" cellpadding="0" cellspacing="0" width="648">
<tbody><tr style="min-height:60.55pt"><td style="border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;border-top-style:dotted;border-top-color:rgb(128, 176, 214);border-top-width:1pt;padding-top:1.45pt;padding-right:5.75pt;padding-bottom:1.45pt;padding-left:5.75pt;min-height:60.55pt">
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><b><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(14, 93, 167)" lang="PT-BR">Moises Silva<br>
</span></b><b><i><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="EN-CA">Software Engineer, Development Manager</span></i></b><b><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(14, 93, 167)" lang="PT-BR"></span></b></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(0, 92, 165)" lang="EN-CA"><a href="mailto:msilva@sangoma.com" target="_blank">msilva@sangoma.com</a></span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(0, 92, 165)" lang="EN-CA">Sangoma Technologies</span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(0, 92, 165)" lang="EN-CA">100 Renfrew Drive, Suite 100, Markham, ON L3R 9R6 Canada</span><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(255, 192, 0)" lang="EN-CA"></span></p>
</td><td style="width:140.45pt;border-right-style:none;border-bottom-style:none;border-left-style:none;border-width:initial;border-color:initial;border-top-style:dotted;border-top-color:rgb(128, 176, 214);border-top-width:1pt;padding-top:1.45pt;padding-right:5.75pt;padding-bottom:1.45pt;padding-left:5.75pt;min-height:60.55pt" width="187">
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(0, 92, 165)" lang="EN-CA"><br>
t. <a href="tel:%2B1%20800%20388%202475" value="+18003882475" target="_blank">+1 800 388 2475</a> (N. America)</span></p><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(0, 92, 165)" lang="EN-CA">t. <a href="tel:%2B1%20905%20474%201990%20x128" value="+19054741990" target="_blank">+1 905 474 1990 x128</a></span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(0, 92, 165)" lang="EN-CA">f. <a href="tel:%2B1%20905%20474%209223" value="+19054749223" target="_blank">+1 905 474 9223</a></span></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(31, 73, 125)" lang="EN-CA"> </span></p>
</td><td rowspan="2" style="width:111.55pt;border-top-style:dotted;border-top-color:rgb(128, 176, 214);border-top-width:1pt;border-left-style:none;border-left-width:initial;border-left-color:initial;border-bottom-style:dotted;border-bottom-color:rgb(128, 176, 214);border-bottom-width:1pt;border-right-style:none;border-right-width:initial;border-right-color:initial;padding-top:1.45pt;padding-right:5.75pt;padding-bottom:1.45pt;padding-left:5.75pt;min-height:60.55pt" width="149">
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><a href="http://www.sangoma.com/contact?utm_source=signature&utm_medium=email&utm_campaign=email+signatures" target="_blank"><b><span style="color:rgb(31, 73, 125);text-decoration:none"><img src="" border="0" height="15" width="96"></span></b></a><span style="color:rgb(31, 73, 125)"></span></p>
</td></tr><tr><td colspan="2" style="width:374.75pt;border-top-style:none;border-right-style:none;border-left-style:none;border-width:initial;border-color:initial;border-bottom-style:dotted;border-bottom-color:rgb(128, 176, 214);border-bottom-width:1pt;padding-top:1.45pt;padding-right:5.75pt;padding-bottom:1.45pt;padding-left:5.75pt" width="500">
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;line-height:15px"><a href="http://sangoma.com/products?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures" target="_blank"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR">Products</span></a><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR"> | </span><a href="http://sangoma.com/solutions?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures" target="_blank"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR">Solutions</span></a><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR"> | </span><a href="http://sangoma.com/about_us/events?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures" target="_blank"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR">Events</span></a><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR"> | </span><a href="http://www.sangoma.com/contact?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures" target="_blank"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR">Contact</span></a><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR"> | </span><a href="http://wiki.sangoma.com/?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures" target="_blank"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR">Wiki</span></a><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR"> | </span><a href="http://www.facebook.com/pages/Sangoma-VoIP-Cards/43578453335?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures" target="_blank"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR">Facebook</span></a><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR"> | </span><a href="http://www.twitter.com/sangoma?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures" target="_blank"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR">Twitter</span></a><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR">`| | </span><a href="http://www.youtube.com/sangomatechnologies?utm_source=signature&utm_medium=email&utm_campaign=email%2Bsignatures" target="_blank"><span style="font-size:8pt;line-height:12px;font-family:Arial, sans-serif;color:rgb(128, 176, 214)" lang="PT-BR">YouTube</span></a><span style="font-size:8pt;line-height:12px;color:rgb(31, 73, 125)"></span></p>
</td></tr></tbody></table><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span> </span><a href="http://sangoma.com/about_us/newsroom/news_releases/news/1488795/Sangoma_Acquires_All_Key_Assets_of_VegaStream.html" target="_blank">VegaStream is now part of Sangoma!</a></p>
<p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><span> </span>Ask us about both <a href="http://sangoma.com/products/media_gateways/vega.html" target="_blank">Gateway Appliances</a> and <a href="http://sangoma.com/products/software_products/netborder_suite/netborder_express.html" target="_blank">Internal Gateways</a></p>
</div></div>
<br><br></blockquote></div><br>