[Freeswitch-users] New BSD timer module

Steven Ayre steveayre at gmail.com
Thu Jul 7 18:24:20 MSD 2011


It's an alternative method of providing timing. When FS wants to wait for,
say, 10ms it uses a timer module to wait that period of time. The software
one uses delays and attempts to calibrate itself for clock drift. mod_kqueue
uses an interval timer that BSD provides which is hopefully also accurate, a
similar idea to mod_timerfd. The testing is more to see whether that's
actually the case or whether the software one turns out to be more reliable.

You can do a quick test using the commands "timer_test 10 200 soft" and
"timer_test 10 200 kqueue". They'll each try sleeping for 10ms 200 times but
using first the software timer and then the kqueue one. You'll see that
nothing every sleeps exactly 10ms. It'll tell you how long it took to do,
ideally it'll be pretty close to 10ms*200 = 2s, but if it's not working well
it might take longer (or less time). It'll also tell you the average time it
slept for, which should be approximately 10ms. The closer the better.
There are also several other intervals that would need to be tried, e.g.
10,20,40,60,120.

The second test is updating your configuration to see whether your audio
quality is better, worse or about the same. For mod_sofia calls that's done
by setting <param name="timer-name" value="kqueue"/> on the SIP profiles.

It's highly experimental, so I'd suggest if you are going to try it out you
don't use it for production traffic just yet.

-Steve




On 7 July 2011 14:50, Tim St. Pierre <fs-list at communicatefreely.net> wrote:

> Hi Steven,
>
> Yes, we are running our FreeSwitch deployment on FreeBSD 8.1 and 8.2  I
> would be glad to try it out, although it might be a few days before I
> get to it.
>
> What is it's purpose, and how would I know if it's working well or not?
>
> Thanks!
>
> -Tim
>
> Steven Ayre wrote:
> > Hi everyone,
> >
> > I've submitted a Jira with a proposed new mod_kqueue timer module.
> > This is a BSD equivalent of mod_timerfd.
> > http://jira.freeswitch.org/browse/FS-3398
> >
> > I'd appreciate it if anyone that uses FreeSWITCH on BSD that feels
> > like it would give it a quick test to see how well it works.
> >
> > To install it:
> > - Create a new directory src/mod/timers/mod_kqueue
> > - Place the mod_kqueue.c file from the jira in that directory
> > - Add timers/mod_kqueue to modules.conf
> > - Build and install
> > - Load it from modules.conf.xml or fs_cli.
> >
> > Regards,
> > Steven Ayre
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Join us at ClueCon 2011, Aug 9-11, Chicago
> > http://www.cluecon.com 877-7-4ACLUE
> >
> > FreeSWITCH-users mailing list
> > FreeSWITCH-users at lists.freeswitch.org
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> > http://www.freeswitch.org
> >
>
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110707/853ef0d7/attachment.html 


More information about the FreeSWITCH-users mailing list