FreeSWITCH performance test on PC Engines APU

This test is analogous to the one I described for Intel Atom CPU.This time it’s the new APU board from PC Engines, the maker of famous ALIX and WRAP boards. APU is a fanless appliance board, with a dual-core 1GHz AMD G series CPU. The overall performance is comparable to that of Intel Atom.

In these tests, FreeSWITCH was forwarding the call to itself on request by pressing *1. Each such forwarding resulted in creating four new channels in G722 and G711, thus resulting in transcoding to G711 and back. For example, if “show channels” shows 5 channels, it’s equivalent to 2 simultaneous calls with transcoding.

Test result: 57 channels were running completely fine, 65 channels had slight distortions, and with 85 channels the speech was still recognizable, but with significant distortions. With Speex instead of G722, distortions were quite annoying at 25 channels. Thus, the APU platform can easily be used as a small-to-medium business PBX for  20-30 simultaneous calls if there’s not too much transcoding.

Test details follow.

Debian Wheezy was installed as described in my previous post. Then, GFreeSWITCH version 1.2.23 was installed from packages, as follows:

apt-get install -y curl git sysstat

cat >/etc/apt/sources.list.d/freeswitch.list <<EOT
deb http://files.freeswitch.org/repo/deb/debian/ wheezy main
EOT

curl http://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -

apt-get update
apt-get install -y freeswitch-meta-all 

cd /etc
git clone https://github.com/xlab1/freeswitch_conf_minimal.git freeswitch

Then, /etc/freeswitch/dialplan/public/05_test.xml was added as follows:

<include>
    <!-- Extension 100 accepts the initial call, plays echo, 
         and on pressing *1 it transfers to 101  -->
    <extension name="100">
      <condition field="destination_number" expression="^100$">
        <action application="answer"/>
        <action application="bind_meta_app" data="1 a si transfer::101 XML ${context}"/>
        <action application="delay_echo" data="1000"/>
      </condition>
    </extension>    

    <!-- Extension 101 plays a beep, then makes an outgoing SIP call from our internal profile to 
         our own external profile and extension 200  -->
    <extension name="101">
      <condition field="destination_number" expression="^101$">
        <action application="playback" data="tone_stream://%(100,100,1400,2060,2450,2600)"/>
        <action application="unbind_meta_app" data=""/>
        <action application="bridge"
                data="{absolute_codec_string=PCMA}sofia/internal/200@${sip_local_network_addr}:5080"/>
      </condition>
    </extension>
    <!-- Extension 200 returns the call to 100 as a new outgoing SIP call from our internal 
         profile to our own external profile -->
    <extension name="200">
      <condition field="destination_number" expression="^200$">
        <action application="answer"/>
        <action application="bridge"
                data="{max_forwards=65}{absolute_codec_string=G722}sofia/internal/100@${sip_local_network_addr}:5080"/>
      </condition>
    </extension>    
</include>

After sending the initial call from a SIP phone to extension 100 at our APU’s IP address and port 5080, after pressing *1 we get 2 new channels with transcoding. Below are results of “mpstat -P ALL 1” command during the test:

# quite clear sound 

root@apu:/etc/freeswitch# fs_cli -x 'show channels' | grep total
57 total.

11:35:07 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
11:35:08 PM  all   41.71    0.00    8.00    0.00    0.00    0.57    0.00    0.00   49.71
11:35:08 PM    0   43.68    0.00    5.75    0.00    0.00    1.15    0.00    0.00   49.43
11:35:08 PM    1   40.45    0.00   10.11    0.00    0.00    0.00    0.00    0.00   49.44


# slight distortions

root@apu:/etc/freeswitch# fs_cli -x 'show channels' | grep total
65 total.

11:36:27 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
11:36:28 PM  all   55.98    0.00    8.70    0.00    0.00    0.54    0.00    0.00   34.78
11:36:28 PM    0   55.91    0.00    7.53    0.00    0.00    2.15    0.00    0.00   34.41
11:36:28 PM    1   55.43    0.00    9.78    0.00    0.00    0.00    0.00    0.00   34.78


# significant distortions

root@apu:/etc/freeswitch# fs_cli -x 'show channels' | grep total
85 total.

11:37:34 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
11:37:35 PM  all   71.13    0.00    9.28    0.00    0.00    2.06    0.00    0.00   17.53
11:37:35 PM    0   71.72    0.00    9.09    0.00    0.00    2.02    0.00    0.00   17.17
11:37:35 PM    1   71.58    0.00    9.47    0.00    0.00    2.11    0.00    0.00   16.84

If G722 is replaced with Speex codec, the CPU load is significantly higher, and already with 25 channels the distortions are quite significant:

# speex 8kHz, distortions

root@apu:/etc/freeswitch# fs_cli -x 'show channels' | grep total
25 total.

12:59:46 AM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest   %idle
12:59:47 AM  all   54.10    0.00    1.64    0.00    0.00    0.00    0.00    0.00   44.26
12:59:47 AM    0   53.85    0.00    2.20    0.00    0.00    0.00    0.00    0.00   43.96
12:59:47 AM    1   54.95    0.00    1.10    0.00    0.00    0.00    0.00    0.00   43.96


Advertisements

, , , ,

  1. Testing FreeSWITCH performance on Scaleway C1 | TXLAB

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: