[Freeswitch-dev] transfer_history performance

David Brazier davidjbrazier at gmail.com
Thu Jan 17 03:57:25 MSK 2013


Our application makes use of long-running calls with a lot of diaplan
transfers to bridge them to other calls, put them on hold etc.  We've
noticed a slow down in performance (high CPU, audio dropped, delayed) after
several hours.  I can reproduce it with some dialplan that does 1000

<extension name="test_transfer">
  <condition field="destination_number" expression="^test_transfer$">
    <action application="set" data="max_forwards=9999"/>
    <action application="transfer" data="test_transfer_999"/>
<extension name="test_transfer_0" continue="false">
  <condition field="destination_number" expression="^test_transfer_0$">
    <action application="hangup"/>
<extension name="test_transfer_n">
  <condition field="destination_number" expression="^test_transfer_(\d+)$">
    <!--<action application="info"/>-->
    <action application="transfer" data="test_transfer_${expr $1-1}"/>
and then

originate user/1000 test_transfer XML blah

On a Windows laptop (git head) it slows down to more than 1 sec per
iteration after it gets past 800, on a bigger Linux server (FS it
gets a bit futher but not much.  On a server with an old version
(git-1086cba 2011-05-23 22-51-43 -0500) it zips through to the end with no
slow down.  If you put the info call in you can see that
variable_transfer_history is growing, and I think this is the source of the
problem - this variable is missing from the older version but the newer
ones are apparently appending to it on each iteration which becomes a very
expensive operation.

I'll raise a Jira.  Any suggestion for a workaround? (Apart from rewriting
our dialplan!)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20130117/fc9b86b2/attachment-0001.html 

Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list