Outbound event_socket memory usage
Hello, I'm currently benchmarking an ESL program that use both outbound and inbound mode and notice a quite large memory usage for the FreeSWITCH process compared to a dialplan that has similar actions (8 set (half multiset), 1 sched_hangup, 1 bridge). The FreeSWITCH process use about 2 Mo per call and about 180 Ko without ESL. This does not look like a leak, the memory usage is stable and proportional to the current calls, Valgrind does not show anything special either. What was tested: - Pure dialplan while running only the inbound ESL subscribing to some events (CHANNEL_HANGUP, CHANNEL_HANGUP_COMPLETE, CHANNEL_EXECUTE_COMPLETE, SESSION_HEARTBEAT) for all channels, inbound ESL does not increase memory consumption, - Outbound ESL that just close the connection at the beginning of the dialplan, same memory usage as a complete ESL program, - Outbound ESL linger set/not set, no change, - Outbound ESL parameters async/full present or not, no change, - Versions 1.10.5~release~17 and 1.10.6~release~18, no change. Does this kind of resource penalty is to be expected? What could cause these differences? For those using outbound ESL, how much memory does your FreeSWITCH use per call?
What is the memory usage attributed to? Your process or FreeSWITCH? On Mon, Sep 27, 2021 at 1:16 PM Adrien Martin <a.martin@alphalink.fr> wrote:
Hello,
I'm currently benchmarking an ESL program that use both outbound and inbound mode and notice a quite large memory usage for the FreeSWITCH process compared to a dialplan that has similar actions (8 set (half multiset), 1 sched_hangup, 1 bridge). The FreeSWITCH process use about 2 Mo per call and about 180 Ko without ESL.
This does not look like a leak, the memory usage is stable and proportional to the current calls, Valgrind does not show anything special either.
What was tested: - Pure dialplan while running only the inbound ESL subscribing to some events (CHANNEL_HANGUP, CHANNEL_HANGUP_COMPLETE, CHANNEL_EXECUTE_COMPLETE, SESSION_HEARTBEAT) for all channels, inbound ESL does not increase memory consumption, - Outbound ESL that just close the connection at the beginning of the dialplan, same memory usage as a complete ESL program, - Outbound ESL linger set/not set, no change, - Outbound ESL parameters async/full present or not, no change, - Versions 1.10.5~release~17 and 1.10.6~release~18, no change.
Does this kind of resource penalty is to be expected? What could cause these differences? For those using outbound ESL, how much memory does your FreeSWITCH use per call?
_________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services. Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Brian West | Co-founder and Developer Need Commercial support? email sales@freeswitch.com FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g> Email: brian@freeswitch.com Mobile: 918-424-9378 Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/> [image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch>
When you disconnect does it go away? On Tue, Sep 28, 2021 at 11:56 AM Adrien Martin <a.martin@alphalink.fr> wrote:
The memory usage is attributed to FreeSWITCH.
_________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services. Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Brian West | Co-founder and Developer Need Commercial support? email sales@freeswitch.com FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g> Email: brian@freeswitch.com Mobile: 918-424-9378 Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/> [image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch>
What is the call doing? On Wed, Sep 29, 2021 at 2:38 PM Adrien Martin <a.martin@alphalink.fr> wrote:
When closing the socket from outbound ESL program the memory is still in use by FreeSWITH. But when the calls end the memory is released.
On 28/09/2021 20:48, Brian West wrote:
When you disconnect does it go away?
_________________________________________________________________________
The FreeSWITCH project is sponsored by SignalWire https://signalwire.com Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services. Build your next product on our scalable cloud platform.
Join our online community to chat in real time https://signalwire.community
Professional FreeSWITCH Services sales@freeswitch.com https://freeswitch.com
Official FreeSWITCH Sites https://freeswitch.com/oss https://freeswitch.org/confluence https://cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com
-- Brian West | Co-founder and Developer Need Commercial support? email sales@freeswitch.com FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045 <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g> Email: brian@freeswitch.com Mobile: 918-424-9378 Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/> [image: https://www.facebook.com/signalwireinc?src=email] <https://www.facebook.com/freeswitch> [image: https://twitter.com/freeswitch] <https://twitter.com/freeswitch>
These are test calls from Sipp clients toward Sipp servers, the RTP does not goes through FreeSWITCH with bypass_media=true. The SIP flow is quite simple: INVITE,180,200,ACK,BYE,200. There is no DTMF, re-INVITE, OPTIONS. The calls duration is set to have 1k to 10k simultaneous calls and 5 to 15 calls per second. About the ESL program or the dialplan: Some headers are set (caller number/name, Privacy). A maximum duration is set with sched_hangup. A maximum ringing duration is set with call_timeout. Some special variables are configured (hangup_after_bridge=false, continue_on_fail=true, sip_ignore_remote_cause=true, bypass_media=true). Then a bridge is used to forward the calls to several gateways (round-robin in the ESL program or with mod_distributor in the dialplan). Both inbound and outbound use Sofia. On 29/09/2021 22:42, Brian West wrote:
What is the call doing?
participants (2)
-
Adrien Martin
-
Brian West