[Freeswitch-users] Speeding up FreeSWITCH load time

Antony Stone Antony.Stone at freeswitch.open.source.it
Thu Jul 14 10:17:23 UTC 2022


On Thursday 14 July 2022 at 02:12:54, TTT wrote:

> That sounds like the cause; this machine has no route to the internet.
> 
> Is there a way to skip this test?

I, too, would very much like to see an option which can be passed to 
FreeSwitch to tell it not to try "anything fancy" involving uPnP, NATPMP, STUN 
etc, and simply accept the network addresses you've specified in the 
configuration file.

This would speed up startup time, and also ensure that FreeSwitch did what you 
expected it to from the config file, not what it thinks it should do instead.

Those who want it to be clever and work things out for itself can continue to 
use the current default mode of operation, of course.


Antony.

> From: Brian West [mailto:brian at freeswitch.com]
> Sent: Wednesday, July 13, 2022 6:04 PM
> To: lists at telium.io
> Cc: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org>
> Subject: Re: [Freeswitch-users] Speeding up FreeSWITCH load time
> 
> switch_find_local_ip in switch_utils.c
> 
> It's trying to figure out which of your local ipv4 and ipv6 addresses can
> reach the internet.

> On Wed, Jul 13, 2022 at 4:59 PM TTT <lists at telium.io
> <mailto:lists at telium.io> > wrote:
> 
> What domain name does the code do a lookup for?  Perhaps it’s not
> resolving.  But I’ll check general DNS lookups too.,
> 
> From: FreeSWITCH-users
> [mailto:freeswitch-users-bounces at lists.freeswitch.org
> <mailto:freeswitch-users-bounces at lists.freeswitch.org> ] On Behalf Of
> Brian West Sent: Wednesday, July 13, 2022 1:56 PM
> To: Avi Marcus <avi at avimarcus.net <mailto:avi at avimarcus.net> >
> Cc: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org
> <mailto:freeswitch-users at lists.freeswitch.org> > Subject: Re:
> [Freeswitch-users] Speeding up FreeSWITCH load time
> 
> We do a look up against a DNS server in the code to check, maybe double
> check that isn't causing an issue?

> On Wed, Jul 13, 2022 at 12:07 PM Avi Marcus <avi at avimarcus.net
> <mailto:avi at avimarcus.net> > wrote:
> 
> You can first try looking at the logs at startup time to see what's taking
> so long, in freeswitch.log

> On Wed, Jul 13, 2022 at 7:33 PM TTT <lists at telium.io
> <mailto:lists at telium.io> > wrote:
> 
> I checked with “ps ax” and confirmed -nonat is running.  But I’ll
> investigate further using strace, and reload of pieces of the config., to
> see where the time is going.
> 
> I’m using HAfs (https://telium.io/hafs) to do the clustering (sensing,
> control, failover, syncing, IP movement, etc) and that works well, I just
> want to speed up the FreeSWITCH recovery speed.
> 
> Thanks

> From: FreeSWITCH-users
> [mailto:freeswitch-users-bounces at lists.freeswitch.org
> <mailto:freeswitch-users-bounces at lists.freeswitch.org> ] On Behalf Of Ken
> Rice Sent: Tuesday, July 12, 2022 9:05 PM
> To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org
> <mailto:freeswitch-users at lists.freeswitch.org> > Subject: Re:
> [Freeswitch-users] Speeding up FreeSWITCH load time
> 
> are you sure -nonat is taking effect? thats about the only thing that would
> take any tome getting freeswitch startes up. without -nonat it takes many
> seconds for  upnp/nat-pmp to timeout.
> 
> the only other way to avoid media loss is to do a full HA setup with proper
>  floating IP and fencing. theres agoos bit of info on this on the wiki and
> various places on the web

> On Jul 12, 2022, at 08:21, TTT <lists at telium.io <mailto:lists at telium.io> >
> wrote:
> 
> I’m looking at a crash recovery scenario, and during this startup period
> the calls in progress have no audio.  (And input media bypass is not an
> option due to topology)

> From: FreeSWITCH-users
> [mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Gregor
> Nanger Sent: Tuesday, July 12, 2022 8:58 AM
> To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org
> <mailto:freeswitch-users at lists.freeswitch.org> > Subject: Re:
> [Freeswitch-users] Speeding up FreeSWITCH load time
> 
> Just for info. Why is this a problem.

> On Tue, 12 Jul 2022, 14:54 TTT, <lists at telium.io <mailto:lists at telium.io> >
> wrote:
> 
> I found that the FreeSWITCH systemd service file already contains a –nonat
> option.  Maybe my expectations are out of line, should it take 10 seconds
> for FreeSWITCH to fully start?  My experience is with Asterisk, which is
> less than half of that to start.
> 
> If that’s normal, how can I diagnose what is consuming the start time?
> 
> 
> Thanks

> From: FreeSWITCH-users
> [mailto:freeswitch-users-bounces at lists.freeswitch.org
> <mailto:freeswitch-users-bounces at lists.freeswitch.org> ] On Behalf Of Avi
> Marcus Sent: Monday, July 11, 2022 3:17 AM
> To: FreeSWITCH Users Help <freeswitch-users at lists.freeswitch.org
> <mailto:freeswitch-users at lists.freeswitch.org> > Subject: Re:
> [Freeswitch-users] Speeding up FreeSWITCH load time
> 
> It's probably taking time to discover NAT.
> 
> If you have a direct public IP and don't require NAT, you can instruct 
freeswitch to skip this step:
> >To turn it off use "-nonat" to start freeswitch. If you still prefer to
> >have NAT detection, but avoiding the port mapping using UPnP/NAT-PMP you
> >can use "-nonatmap".
> 
> via: https://freeswitch.org/confluence/display/FREESWITCH/Auto+Nat
> 
> -Avi Marcus
> 
> On Mon, Jul 11, 2022 at 4:48 AM TTT <lists at telium.io
> <mailto:lists at telium.io> > wrote:
> 
> Is there a guide on how to speed FS loading times?  FS takes 10+ seconds to
> start which seems long (for a very simple configuration).
> 
> _________________________________________________________________________




More information about the FreeSWITCH-users mailing list