<div dir="ltr">Thanks again Peter. <br>So my theory attributing timer issue to the terrible audio quality goes away. Need to find what else could be the cause !!<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Aug 29, 2013 at 2:36 PM, Peter Olsson <span dir="ltr"><<a href="mailto:peter@olssononline.se" target="_blank">peter@olssononline.se</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Yes, it might be a typo. IIRC it should be usec for time_test. The small sample of timer_test you provided seems ok to me, +/- 40 usec is probably good enough.<div><br></div><div>I think you're good to go :)</div>
<div><div class="h5">
<div><br></div><div>/Peter<div class="gmail_extra"><br><div class="gmail_quote">2013/8/29 Jayanth Acharya <span dir="ltr"><<a href="mailto:jayachar88@gmail.com" target="_blank">jayachar88@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Aug 29, 2013 at 1:28 PM, Peter Olsson <span dir="ltr"><<a href="mailto:peter@olssononline.se" target="_blank">peter@olssononline.se</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br><div dir="ltr">I believe that timerfd is used automatically in the core if it detects a system supporting it. However, I don't know how to really be sure.. :) One thing though, if you just startup FS, if it doesn't try to do clock calibration during startup, I think it is using timerfd stuff, so that might be a way to "know"...<div>
<br></div><div>Also, when running FS, you can try timer_test command (inside FS console) and check out the results in there.</div><span></span></div></blockquote><div><br></div><div>Thanks Peter.<br><br>freeswitch@dabbian1> timer_test 10 3<br>
2013-08-29 13:56:24.703028 [CONSOLE] mod_commands.c:827 Timer Test: 1 sleep 10 10019<br>2013-08-29 13:56:24.712967 [CONSOLE] mod_commands.c:827 Timer Test: 2 sleep 10 9930<br>2013-08-29 13:56:24.722996 [CONSOLE] mod_commands.c:827 Timer Test: 3 sleep 10 10040<br>
<br>Avg: 9.996ms Total Time: 29.989ms<br><br></div><div>However, for the "time_test" command in Mod_commands Wiki page -- I see that it assumes units as "microseconds" (not milliseconds, which is usually what we mean by "ms").. or is it a typo ??<br>
<br><i>... bad timer jitter is. It runs the test
count times (default 10) and tries to sleep for<span style="background-color:rgb(255,255,0)"> mss microseconds</span>. It
returns the actual timer duration along with an average.
<br></i></div><div> <br></div><div>Anyhow, not sure how to interpret if the output of timer_test indicates a healthy resolution or not.<br><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><span><font color="#888888"><div></div><div>/Peter</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/8/29 Jayanth Acharya <span dir="ltr"><<a href="mailto:jayachar88@gmail.com" target="_blank">jayachar88@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div><div>Thanks Jeff. Reading the mod_timerfd wiki page, I see that there are 2 approaches to using timerfd, <br><br></div>1. Using the loadable module i.e. mod_timerfd (requiring me to build this module and then ensure it is loaded)<br>
</div>2. Using the support of timerfd now available in FS core itself (requiring me to just enable it in the switch.conf file)<br><br></div>By default neither of those 2 seem to be true. I am on what as the Git HEAD last week - 22nd Aug 2013, so pretty recent source. However, it when I adopted the 2nd approach, i.e. enable timerfd use in FS core, by enabling the config in switch.conf, it didn't have the desired effect. Perhaps indicating that my problems might not be limited to just the timer resolution !!<br>
<br></div>Using the method described here: <br><a href="http://www.advenage.com/topics/linux-timer-interrupt-frequency.php" target="_blank">http://www.advenage.com/topics/linux-timer-interrupt-frequency.php</a><br><br></div>
I tested and found that on my FS machine, the timer resolution available is already pretty good -- in the ~3KHz range, so shouldn't be an issue, if FS core is indeed correctly using timerfd.<br>
<br>---<br>kernel timer interrupt frequency is approx. 3401 Hz<br>jayachar@dabbian1:~$ ./timer_resolution_test<br>kernel timer interrupt frequency is approx. 3401 Hz<br>jayachar@dabbian1:~$ ./timer_resolution_test<br>kernel timer interrupt frequency is approx. 3448 Hz<br>
jayachar@dabbian1:~$ ./timer_resolution_test<br>kernel timer interrupt frequency is approx. 3021 Hz<br>jayachar@dabbian1:~$ ./timer_resolution_test<br>kernel timer interrupt frequency is approx. 3067 Hz<br>---<br><br></div>
I have already check that my kernel has the TIMERFD option enabled in the build, which explains (perhaps) the ~3KHz resolution I see.<br><br></div>So the question now is, is FS really using the timerfd logic in it's core properly, or do I need to try the mod_timerfd method as well !! (That's a rhetorical question... I will go ahead and try anyway, disabling the FS core option to use timerfd, as per the Wiki).<br>
<div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 29, 2013 at 11:21 AM, Jeff Leung <span dir="ltr"><<a href="mailto:jleung@v10networks.ca" target="_blank">jleung@v10networks.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><p><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)">If I can recall correctly, timerfd will be used automatically regardless in recent versions of FreeSWITCH if it’s available.<u></u><u></u></span></p>
<p><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)"><u></u> <u></u></span></p><div style="border-width:medium medium medium 1.5pt;border-style:none none none solid;border-color:-moz-use-text-color -moz-use-text-color -moz-use-text-color blue;padding:0in 0in 0in 4pt">
<div><div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(181,196,223) -moz-use-text-color -moz-use-text-color;padding:3pt 0in 0in"><p><b><span style="font-size:10pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10pt;font-family:"Tahoma","sans-serif""> <a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a> [mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b>On Behalf Of </b>Jayanth Acharya<br>
<b>Sent:</b> Wednesday, August 28, 2013 9:35 PM<br><b>To:</b> FreeSWITCH Users Help<br><b>Subject:</b> [Freeswitch-users] CONFIG_HZ=1000 vs mod_timerfd -- preferred approach<u></u><u></u></span></p></div></div><div><div>
<p><u></u> <u></u></p><div><div><div><p>Assuming that one has full control over the kernel configuration and FS build / config options, is there a preferred mechanism between the 2 for letting FS have access to high resolution timers, i.e.<u></u><u></u></p>
</div><ul type="disc"><li>CONFIG_HZ=1000<u></u><u></u></li><li>mod_timerfd<u></u><u></u></li></ul><p>This was one step I missed in my FS setup, and I think it might explain the extremely choppy, broken, garbled announcement I hear when I call into my gsmopen EP via phone.<u></u><u></u></p>
<p>J<u></u><u></u></p></div></div></div></div></div></div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>
</div></div><br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org" target="_blank">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div></div></div></div></div>
<br>_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a href="http://www.cudatel.com" target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://wiki.freeswitch.org" target="_blank">http://wiki.freeswitch.org</a><br>
<a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br></div>