[OpenSIPS-Users] OpenSIPS maximum performance in a multiprocessor machine (SMP)

Italo Dacosta idacosta at gatech.edu
Mon Sep 14 23:23:38 CEST 2009


>Ok - that's the first problem. Number of children == number of
>processes. You cannot handle more than 4 messages at one time right
>now.

I forgot to mention that I tested with several number of children
already. Surprisingly, increasing the number of processes seems to
reduce performance. With 8 children processes the maximum call rate I
measured was around 17,000 cps. I think that the performance is lower
due to the overheads associated with context switching.

As I have observed, OpenSIPS uses 4 additional processes in addition to
the children processes (two timer-related processes, one for the mi_fifo
 module mgt. interface, and the parent process?). Therefore, if I use 4
children processes, a total of 8 processes will be running. However, I
am not sure that these additional processes are CPU intensive as the
processes handling SIP messages.

>Also - what modules are enabled and how does your usrloc find the
>location - is it db query, or something else? If you use anything
>external for lookup, I'd change children to 16 (if memory only, then
>8)

usrloc is using memory (database mode is disabled). These are the
modules enabled:

loadmodule "db_mysql.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "uri_db.so"
loadmodule "uri.so"
loadmodule "xlog.so"


>> I am also using SIPp 3.1 to generate the test call traffic.

>On the same host, or on a separate one? From my experience sipp can
>eat loads of cpu and it's threading is less than good. So in a perfect
>scenario, you want sipp on a separate host and check whether it's not
>cpu-starved there.

Each SIPp instance (28 in total) is running in a separate machine.
OpenSIPS is the only application running in the machine described before.

>> With the above configuration  the proxy is able to reach around
>>20,000 calls per second (cps).

>What do you mean by that? What happens if you try to send more? What
>do you mean by "calls" - your config allows only for an >
>INVITE/NOTIFY/something else to be sent via proxy - is that all you're
>testing (i.e. are you testing "messages with lookup per second)? Then
>you can find the maximal possible throughput by using ~10 children
>doing only {forward();} - you'll not get better performance than that.

I am using the default scenarios in SIPp (UAC and UAS). Basically, a
call session is established between two SIPp instances and then the call
is immediately terminated by the caller (see
http://sipp.sourceforge.net/doc/reference.html#UAC)

I am using SIPp statistics to measure the number of calls per second
established.

>Yes - cpu 7 handles most irq, so it's probably the network card -
>check it in /proc/interrupts. If your card supports it, you can change
>/proc/irq/XXX/smp_affinity (where XXX is the network card irq) to use
>all cpus. It will either help or kill the performance - depending on
>many things.

Good idea. I will try to change the processor affinity to see what happens.

>If it was network, you'd get very high %wait / %irq. To get a real
>answer to your question, you could simply run opensips under a
>profiler.

Yes, I was also thinking about that. I am planning to use oprofile. Do
you have any recommendation?


>I hope that helps a little.
It does help. Thanks a lot.

ID






More information about the Users mailing list