[Freeswitch-users] Freeswitch performance as a redirecting server

Tihomir Culjaga tculjaga at gmail.com
Tue Aug 25 01:54:07 PDT 2009


Hello,

i'm trying to use freeswitch as a redirecting server meaning FS has to
receive an INVITE and according to some rules it will redirect calls to
other destinations.


CALLING_USER                FREESWITCH                        SOMEWHERE

INVITE ------------------------------->
           <------------------------------ 100 Trying
           <------------------------------ 302 Moved Temporary
ACK    ------------------------------->
INVITE--------------------------------------------------------------------------------->



Well, wverything works well except i have perfromance issues .... on my HW
FS cannot do more than 40 CPS (INVITE answered by 302 Moved Temporary). When
i increase the rate, FS starts delaying 302 response. Right at 50 CPS i see
"calls" being build up in FS and the delay begining to grow.

When i observe the machine, load average is almost nothing (load average:
1.41, 0.61, 0.60) CPU never goes to 100%, and i see only one thread taking
most load... all others are just sitting there with 1-5 % CPU time.
This looks to me as FS handles 302 messages in a single thread?!?!


tculjaga at FS:/usr/local/freeswitch/conf/dialplan$ top -H

top - 10:41:37 up 167 days, 20:42,  3 users,  load average: 1.41, 0.61, 0.60
Tasks:  83 total,   2 running,  81 sleeping,   0 stopped,   0 zombie
Cpu(s): 25.3%us,  1.5%sy,  0.0%ni, 30.3%id, 42.7%wa,  0.0%hi,  0.2%si,
0.0%st
Mem:   2074520k total,   571244k used,  1503276k free,   259604k buffers
Swap:  2650684k total,     3020k used,  2647664k free,   153868k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+
COMMAND
 4814 root      20   0 34188  20m 3780 S   38  1.0   3:10.29
freeswitch
 4800 root      20   0 34188  20m 3780 S    6  1.0   0:08.26
freeswitch
 4798 root      20   0 34188  20m 3780 R    5  1.0   0:24.46
freeswitch
 4787 root      20   0 34188  20m 3780 S    2  1.0   0:11.24
freeswitch
 4794 root      20   0 34188  20m 3780 S    1  1.0   0:11.42
freeswitch
 4803 root      20   0 34188  20m 3780 S    1  1.0   0:11.74
freeswitch
 4788 root      20   0 34188  20m 3780 S    1  1.0   0:02.96
freeswitch
 4804 root      20   0 34188  20m 3780 S    1  1.0   0:01.64
freeswitch
 4807 root      20   0 34188  20m 3780 S    1  1.0   0:01.68
freeswitch
 4811 root      20   0 34188  20m 3780 S    1  1.0   0:02.50 freeswitch



cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU            5140  @ 2.33GHz
stepping        : 6
cpu MHz         : 2333.560
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm
constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16
xtpr dca lahf_lm
bogomips        : 4670.78
clflush size    : 64
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Xeon(R) CPU            5140  @ 2.33GHz
stepping        : 6
cpu MHz         : 2333.560
cache size      : 4096 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm
constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx est tm2 ssse3 cx16
xtpr dca lahf_lm
bogomips        : 4666.82
clflush size    : 64
power management:



uname -a
Linux l01sipindir1 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686
GNU/Linux



Of course, i've tuned the machine up

ulimit -c unlimited
ulimit -d unlimited
ulimit -f unlimited
ulimit -i unlimited
ulimit -n 999999
ulimit -q unlimited
ulimit -u unlimited
ulimit -v unlimited
ulimit -x unlimited
ulimit -s 240
ulimit -l unlimited
ulimit -a


Started FS with minimum modules but still 40 CPS seems to be the limit.


So, is there any way to improve performance?


Tihomir.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090825/eb3785aa/attachment-0002.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: external.xml
Type: text/xml
Size: 1600 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090825/eb3785aa/attachment-0012.xml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: internal.xml
Type: text/xml
Size: 6918 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090825/eb3785aa/attachment-0013.xml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: default.xml
Type: text/xml
Size: 546 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090825/eb3785aa/attachment-0014.xml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: public.xml
Type: text/xml
Size: 3198 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090825/eb3785aa/attachment-0015.xml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: switch.conf.xml
Type: text/xml
Size: 2752 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090825/eb3785aa/attachment-0016.xml 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modules.conf.xml
Type: text/xml
Size: 2970 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090825/eb3785aa/attachment-0017.xml 


More information about the FreeSWITCH-users mailing list