[Freeswitch-users] CONFIG_HZ=1000 vs mod_timerfd -- preferred approach

Jayanth Acharya jayachar88 at gmail.com
Thu Aug 29 11:00:06 MSD 2013


Thanks Jeff. Reading the mod_timerfd wiki page, I see that there are 2
approaches to using timerfd,

1. Using the loadable module i.e. mod_timerfd (requiring me to build this
module and then ensure it is loaded)
2. Using the support of timerfd now available in FS core itself (requiring
me to just enable it in the switch.conf file)

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 !!

Using the method described here:
http://www.advenage.com/topics/linux-timer-interrupt-frequency.php

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.

---
kernel timer interrupt frequency is approx. 3401 Hz
jayachar at dabbian1:~$ ./timer_resolution_test
kernel timer interrupt frequency is approx. 3401 Hz
jayachar at dabbian1:~$ ./timer_resolution_test
kernel timer interrupt frequency is approx. 3448 Hz
jayachar at dabbian1:~$ ./timer_resolution_test
kernel timer interrupt frequency is approx. 3021 Hz
jayachar at dabbian1:~$ ./timer_resolution_test
kernel timer interrupt frequency is approx. 3067 Hz
---

I have already check that my kernel has the TIMERFD option enabled in the
build, which explains (perhaps) the ~3KHz resolution I see.

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).



On Thu, Aug 29, 2013 at 11:21 AM, Jeff Leung <jleung at v10networks.ca> wrote:

> If I can recall correctly, timerfd will be used automatically regardless
> in recent versions of FreeSWITCH if it’s available.****
>
> ** **
>
> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Jayanth
> Acharya
> *Sent:* Wednesday, August 28, 2013 9:35 PM
> *To:* FreeSWITCH Users Help
> *Subject:* [Freeswitch-users] CONFIG_HZ=1000 vs mod_timerfd -- preferred
> approach****
>
> ** **
>
> 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.****
>
>    - CONFIG_HZ=1000****
>    - mod_timerfd****
>
> 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.****
>
> J****
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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/20130829/b8d5b1e5/attachment.html 


Join us at ClueCon 2013 Aug 6-8, 2013
More information about the FreeSWITCH-users mailing list