SIP Performance Evaluation Framework
SIP Performance Evaluation Framework
Nattanond Sangvanphant
Session Initiation Protocol (SIP) has been used for signaling in many Voice over IP
(VoIP) applications. Being more cost-effective than conventional circuit-switched
systems, IP-based telecommunication systems are extensively employed by many
service providers. As these systems gain more popularity, the need for dimensioning
of such systems grows correspondingly. Moreover, accurate information about system
capacity is necessary for future improvements of the system, as well as service
provision and implementation planning. For these reasons, a solution supporting
system performance evaluation is useful and beneficial in several ways.
The goal of this research was to develop a performance evaluation framework for a
SIP-based telecommunication system. The developed framework facilitates
measurements of the maximum number of requests which can be processed by a
system, and the amount of time required for call session establishment. With a user-
friendly interface, the framework enables system testers to perform experiments using
simulated SIP traffics, as well as to deal with results interpretation easily.
In order to achieve the objective, studies of related technologies and available tools
for SIP traffic generation have been carried out. Afterwards, the performance
evaluation framework is designed and implemented. Lastly, the developed framework
is used for evaluating the performance of EasyVPaBX, a SIP-based call handling
system, in various system configurations.
I
II
Sammanfattning
Session Initiation Protocol (SIP) har använts för singalering i många olika VoIP-
tillämpningar (Voice over IP). Tack vare ökad kostnadseffektivitet, jämfört med
konventionella kretskopplade lösningar, har användandet av IP-baserade
telekommunikationssystem ökat markant bland tjänsteoperatörer. Vartefter som
dessa system ökar i popularitet växer behovet av att kunna göra motsvarande
systemdimensionering. För framtida förbättringar av systemen, samt av
möjligheterna att tillhandahålla tjänster och planera för utbyggnad, finns det behov
av kunna erhålla korrekt information om kapacitet i systemen. Av dessa skäl blir nya
lösningar som stöder utvärdering av systemprestanda både nödvändiga och
användbara på flera olika sätt.
Målet med detta arbete har varit att uveckla ett ramverk för prestandautvärdering
av SIP-baserade telekommunikationssystem. Det ramverk som har utvecklats
möjliggör mätningar av maximalt antal förfrågningar som kan processas av systemet,
samt av tiden det tar att etablera samtalssessioner. Med sitt användarvänliga
gränssnitt gör ramverket det möjligt för systemtestare att utföra experiment
baserade på simulerad SIP-trafik, samt att tolka resultaten på ett smidigt sätt.
För att nå målet med arbetet studerades relaterade tekniker och tillgängliga verktyg
för att generera SIP-trafik. Därefter genomfördes design och implementation av
själva ramverket för prestandautvärdering. Slutligen har det färdiga ramverket
utnyttjats för att utvärdera prestandan av EasyVPaBX, ett system för SIP-baserad
samtalshantering, i olika typer av systemkonfigurationer.
III
IV
Acknowledgement
This thesis is a part of the Master of Science in Security and Mobile Computing
degree in the NordSecMob program. It is done at the Department of Telematics
(ITEM), Norwegian University of Science and Technology (NTNU).
I would like to thank my supervisors, Mazen Malek Shiaa, and Professor Finn Arve
Aagesen for all their guidance, assistance, and valuable feedback throughout the
period of this thesis. Additionally, I would like to thank [Link]. Markus Hidell at
the Royal Institute of Technology (KTH) in Stockholm, Sweden for his supervision.
Special thanks to Kirati Suttikulpanich for his beneficial ideas and advice.
Lastly, I would like to thank my family and friends in Thailand for their love and
support throughout the time that I have to be away from home.
Nattanond Sangvanphant
V
VI
Contents
Abstract ...................................................................................................................... I
Sammanfattning ....................................................................................................... III
Acknowledgement ...................................................................................................... V
Contents .................................................................................................................. VII
List of Figures .......................................................................................................... XI
List of Tables .........................................................................................................XIII
1 Introduction............................................................................................................. 1
1.1 Motivation and Background .......................................................................... 1
1.2 Objective and Scope ...................................................................................... 2
1.3 Research Work Activities .............................................................................. 3
1.4 Structure of the Report ................................................................................. 4
2 Background ............................................................................................................. 5
2.1 Session Initiation Protocol (SIP) ................................................................... 5
2.1.1 SIP User Identifier .................................................................................. 6
2.1.2 SIP Components ..................................................................................... 6
2.1.3 SIP Messages .......................................................................................... 7
2.1.4 SIP Headers ............................................................................................ 9
2.1.5 SIP Conversation ...................................................................................10
2.2 SIPp - SIP Performance Testing Tool ..........................................................11
2.2.1 Running SIPp ........................................................................................11
VII
2.2.2 Controlling SIPp ....................................................................................12
2.2.3 Call Rate................................................................................................12
2.2.4 XML Scenario File .................................................................................12
2.2.5 Statistics ................................................................................................14
2.2.6 Output Files ..........................................................................................15
2.3 OpenSIPS - Open Source SIP Server ............................................................16
2.4 EasyVPaBX .................................................................................................17
2.4.1 PaBX and Virtual PaBX .......................................................................17
2.4.2 Key Features..........................................................................................18
2.4.3 System Architecture ..............................................................................18
3 Experiment on SIPp and OpenSIPS .......................................................................21
3.1 Installation ...................................................................................................21
3.1.1 Environment ..........................................................................................21
3.1.2 SIPp .......................................................................................................21
3.1.3 OpenSIPS ..............................................................................................22
3.2 Scenarios ......................................................................................................22
3.2.1 UAC and UAS .......................................................................................22
3.2.2 UAC and UAS with a SIP proxy ...........................................................24
3.3 Results for Various Settings .........................................................................26
3.3.1 Traffic Generation Rates .......................................................................26
3.3.2 OpenSIPS Memory Configuration ..........................................................27
3.4 Discussion about SIPp and OpenSIPS..........................................................28
4 SIP Performance Evaluation Framework................................................................29
4.1 Framework Overview ...................................................................................29
4.2 Requirement Specification ............................................................................30
4.2.1 Performance Measurements ...................................................................30
4.2.2 Scenarios ................................................................................................31
4.2.3 User Interface.........................................................................................35
VIII
4.3 Design...........................................................................................................35
4.3.1 Components ...........................................................................................35
4.3.2 Graphic User Interface ...........................................................................37
4.4 Implementation ............................................................................................39
4.4.1 Initial Requirements ..............................................................................39
4.4.2 Scenario Files .........................................................................................40
4.4.3 Threads ..................................................................................................41
4.4.4 Starting SIPp .........................................................................................44
4.4.5 Controlling SIPp ....................................................................................45
4.4.6 Reading Statistics File ...........................................................................46
4.4.7 Displaying Graphs .................................................................................46
5 EasyVPaBX Performance Evaluation.....................................................................49
5.1 System Configuration ...................................................................................49
5.1.1 Single Computer ....................................................................................50
5.1.2 Two Computers with a Load Balancer ..................................................51
5.2 Testing Environment ....................................................................................53
5.3 Performance Evaluation Results...................................................................54
5.3.1 Single Computer: Machine A .................................................................54
5.3.2 Single Computer: Machine B .................................................................55
5.3.3 Single Computer: Machine C .................................................................56
5.3.4 Single Computer: Machine D .................................................................57
5.3.5 Load Balancing: Machine C and Machine D ..........................................58
5.4 Results Comparison ......................................................................................59
5.5 Results Discussion ........................................................................................61
6 Framework Evaluation and Discussion ...................................................................63
6.1 Requirement Verification..............................................................................63
6.2 Comparisons to SIPp ....................................................................................64
6.2.1 Evaluation Parameters Specification......................................................64
IX
6.2.2 Results Presentation ..............................................................................64
6.3 Discussions ...................................................................................................65
6.3.1 Performance Evaluation based on SIP Signals .......................................65
6.3.2 Platform Compatibility ..........................................................................65
6.3.3 Proxy Server and Call Recipient ............................................................66
6.3.4 Determination of the System Capacity ..................................................66
6.3.5 Traffic Patterns .....................................................................................66
7 Conclusions.............................................................................................................67
7.1 Summary ......................................................................................................67
7.2 Future Work ................................................................................................68
References ..................................................................................................................69
Appendix A User Manual .......................................................................................73
Appendix B Simple Call Scenario File ....................................................................75
Appendix C Queue Scenario File ............................................................................77
Appendix D SIP Miscellaneous ...............................................................................79
Appendix E SIPp Miscellaneous .............................................................................81
Appendix F OpenSIPS Miscellaneous.....................................................................85
X
List of Figures
Figure 2-1: Example of a SIP INVITE request (adapted from [1]) ............................ 8
Figure 2-2: Example of a SIP response (adapted from [1]) ........................................ 9
Figure 2-3: Example of SIP transactions (adapted from [1]) ....................................10
Figure 2-4: EasyVPaBX Architecture (adapted from [19]) .......................................18
XI
Figure 4-10: Java method for command line execution ............................................44
Figure 4-11: Generating a shell script from configuration parameters ......................45
Figure 4-12: Simplified Java code in the control thread ...........................................46
XII
List of Tables
XIII
XIV
Introduction
1
1.1 Motivation and Background
Session Initiation Protocol (SIP [1]) has become an industry standard for Voice
over IP (VoIP) applications. IP-based telecommunication systems are widely used
because of their cost-effectiveness compared to conventional circuit-switched
systems. As a basis for cost-effective implementations, knowledge about the
performance of the SIP-system is needed.
Many aspects of performance have been studied and certain evaluation approaches
are suggested. According to [2], the most important metric of SIP performance is
the number of requests that the server can process successfully (throughput).
Another significant aspect is the latency needed for setting up the session since SIP
has sub-second timing requirements that affect the overall performance of the
system [3].
control
result
The thesis focuses on two metrics, 1) system capacity and 2) the time needed for
call establishment. These two aspects of performance are measured using simulated
SIP traffics towards a target system. Considering the SIP traffic generation, there
are two issues that must be noted. First, SIP call sessions produced by the
framework do not contain any media data. For simplicity, the thesis focuses only
on the control plane of call sessions. Therefore, performance evaluation performed
by the framework is based on SIP signaling alone. Call sessions with media streams
may have certain degrees of influence on the performance, but this is not taken
into consideration in this thesis work. Second, implementation of the traffic
generator and the SIP proxy used in the framework are not parts of this thesis.
The two components are chosen from existing tools available as open source
projects.
The research work performed in this thesis is divided into three steps, study,
develop, experiment, and evaluate. Details of each step are given as follow.
Study
The first step includes a study of related technologies, available tools to be used as
SIP traffic generator and SIP proxy, as well as the target system. As for the SIP
protocol, we focused on SIP messages, transactions, and roles of SIP participants.
Two tools, SIPp and OpenSIPS were studied. We configured a simple SIP system
based on these tools and some tests were performed.
Develop
With the available tools studied in the previous step, we designed and
implemented the performance evaluation framework. We analyzed the requirement
specifications of the framework. After that, a detailed design of the application was
made. We continued with the implementation step which includes defining SIP
scenarios, managing the interactions with a SIP traffic generator, processing
captured results, and drawing graphical diagrams.
Experiment
From the knowledge of the EasyVPaBX obtained in the first step, we identified
certain system configurations for target systems. The target systems were
prepared with necessary components such as an application server and a database.
The EasyVPaBX was deployed on the target systems. In addition to the target
systems, we configured another system with the performance evaluation framework
as well as other elements (i.e. a SIP proxy and a call recipient) to act as a tester.
Evaluate
Session Initiation Protocol (SIP) [1] is a signaling protocol for session management.
Typically, the main functions of SIP include locating end points, contacting and
exchanging information between end points for session establishment, modifying,
and terminating multimedia sessions with one or multiple participants [9]. SIP
works in an application layer and is independent of underlying transport layer.
Therefore, it can run on top of different transport protocols e.g. TCP, UDP.
SIP can be easily incorporated with various types of Internet applications. Since
SIP only deals with managing session, it is not an entire communication system by
itself. SIP is independent of the type of multimedia session handled and of the
mechanism used to describe the session [10]. Hence, SIP should be used with other
protocols to provide a complete service. These protocols include the Real-time
Transport Protocol (RTP) [11] for transporting real-time data such as audio and
video, the Real-Time Streaming Protocol (RTSP) [12] for media streaming control,
and the Session Description Protocol (SDP) [13] which is used to describe
multimedia communication sessions for session negotiation purpose. Nevertheless,
SIP is not dependent on any of them. Introducing new SIP applications does not
require changes to the network infrastructure. For these reasons, SIP has been
widely acknowledged as the industry standard for voice over IP (VoIP) protocols.
6
SIP allows SIP user agents (see section [Link]) on the Internet to locate each
other. SIP provides name mapping and redirection service which allows user
mobility. The namespace maps between user identifier and the current location of
the user. Therefore, users can use a single identifier regardless their network
location. A SIP participant is identified by a Uniform Resource Identifier (URI).
This URI acts as a contact number for the participant. The syntax of SIP URIs is
sip:username@host:port, where host is the domain name of the SIP service
provider, and port is the port number which listens to SIP requests. For secure
transmission mode, sips: is used instead of sip: to represent the transportation
over the Transport Layer Security (TLS) protocol.
According to RFC 3261 [1], the SIP architecture consists of different SIP
components. These components interact with each other in a SIP scenario. There
are two main components in a SIP system: user agents and SIP servers.
A SIP UA can be divided into two roles, a User Agent Client (UAC), and a
User Agent Server (UAS). Within a SIP transaction, UAC generates SIP
requests, while UAS receives the requests, produces SIP response, and sends
it back to UAC. A single UA can function as both UAC and UAS.
• Proxy Server : SIP proxy server acts on behalf of clients to forward SIP
requests. It looks up a location of the destination and routes the traffic
to the corresponding recipient. Two types of proxy server are stateful
proxy and stateless proxy. The stateful proxy maintains the state of the
transaction while the stateless proxy relays SIP requests without keeping
any state information
• Redirect Server : SIP redirect server generates redirection answers to
indicate the client to try a different route. This happens when a
recipient has moved from its original location.
Redirect server does not forward the requests to the destination itself.
Instead, it guides the caller to the next destination by replying with a
location of the target URI. The client uses the received route
information to send the request to the destination.
• Registrar Server : A registrar processes REGISTER requests from users
to update their locations. A SIP URI is bound to its current location
temporarily. Therefore, every time a user logins, the UA sends a
registration message containing the location of the user to the registrar
• Location Server : A location server provides current location information
of SIP users. It cooperates with a registrar to maintain the mapping
between URIs and corresponding locations. The addresses registered at a
registrar are stored in a location server.
SIP is a text-based protocol based on the UTF-8 character set. SIP messages
consist of a start-line, header fields, one empty line indicating the end of the
header fields, and an optional message body. The start-line can be either a
Request-line or a Status-line depends on the type of the message. The syntax of
SIP messages and header fields are similar to messages in the Hypertext Transfer
Protocol (HTTP). SIP messages can be categorized into two types, SIP requests
and SIP responses.
8
Only six methods are defined in RFC 3261 [1] , they are INVITE, ACK,
BYE, CANCEL, REGISTER, and OPTIONS. Additional methods have
been defined later to support more complicated services. SIP methods and
their descriptions can be found in Table D-1, Appendix D.
Figure 2-2 below shows an example of a SIP response. The response message
is the result associated to an INVITE message initiated by Alice
(alice@[Link]) to Bob (bob@[Link]). This response contains 200
as a Status-Code, and OK as a Reason-Phrase.
9
SIP/2.0 200 OK
Via: SIP/2.0/UDP [Link]
;branch=z9hG4bKnashds8;received=[Link]
Via: SIP/2.0/UDP [Link]
;branch=z9hG4bK77ef4c2312983.1;received=[Link]
Via: SIP/2.0/UDP [Link]
;branch=z9hG4bK776asdhds ;received=[Link]
To: Bob <sip:bob@[Link]>;tag=a6c85cf
From: Alice <sip:alice@[Link]>;tag=1928301774
Call-ID: a84b4c76e66710@[Link]
CSeq: 314159 INVITE
Contact: <sip:bob@[Link]>
The Status-Code is an integer with 3 digits. This code indicates the result
of an attempt of a request. The Reason-Phrase, which is intended for
human user, gives short description explaining the Status-Code.
SIP defines the classes of response using the first digit of the Status-Code.
The other two digits vary for different results. For instance, a code between
100 and 199 is in the class 1xx response. Six classes of response and their
descriptions can be found in Table D-2, Appendix D.
Apart from a Status-line of a Request-line in the first line of a SIP message, there
is a set of SIP headers in the following lines. Each header field consists of a field-
name, a colon, and a field-value. Whitespaces are allowed on either side of the
colon. However, it is suggested in RFC 3261 [1] that the implementations use only
one single space between the colon and the field-value. Examples can be found in
SIP messages in Figure 2-1 and Figure 2-2. (See Table D-3 for lists of SIP headers)
10
Once the INVITE message is received by Bob’s UA, it replies with a 180 Ringing
message. When Bob picks up the call, a 200 OK message is generated and sent
back to Alice’s UA via the two proxies. After Alice’s UA gets the 200 OK, it
acknowledges Bob’s UA by sending an ACK message. From this point on, the
session has been established. Further media sessions can begin right after this.
When Bob hangs up the call, his UA generates a BYE message and sends it to
Alice’s UA to terminate the session. Alice’s UA replies with a 200 OK message,
and the session is terminated at both sides.
11
SIPp[4] is a free performance testing tool for the SIP protocol. The SIPp project
has been initiated by Richard Gayraud, and Olivier Jacques from Hewlett Packard
Company. It is now an open source project being developed by many contributors.
SIPp can be used to test SIP equipments by generating SIP traffic and recording
performance measurements. The measurements provided include response time,
call time, number of successful calls and failed calls, number of ongoing calls, etc.
SIPp can generate multiple SIP calls to a remote system. In addition, many
instances of SIPp can be run simultaneously as long as they are bound to different
socket on the same machine. SIPp tool is based on the command line interface.
The interactive text-based results are displayed in several screens. For the
performance testing purpose, SIPp provides the ability to periodically save the
statistics as well as other logs to output files. Those files are of the comma-
separated-values or CSV format.
SIPp tool is available on almost all UNIX platforms including Linux. It can be also
run on the Windows platform. However, the Windows version of SIPp may not be
suitable for testing purpose since it cannot handle high performances. To reach
high performances, the UNIX systems are recommended.
SIPp can be started from the command line. Several startup parameters are passed
to the SIPp process to configure it. The format of the command is
The remote_host and remote_port is the target of the generated traffic. After the
execution, SIPp starts generating and sending sequences of SIP messages to the
target. The sequence of SIP messages are defined by the embedded scenarios or the
external XML scenario file. Important parameters used when starting SIPp are
listed in Table E-1, Appendix E.
After an instance of SIPp tool has been created, the display screen shows the
diagram of SIP messages as well as message counters. Further interactions with
the tool are addressed in the next section.
12
Once a SIPp instance has been created and running, it can be controlled using two
sets of commands, the hot keys and the interactive commands. Hot keys refer to
single key commands which can be entered at any time. See Table E-3 in
Appendix E, for the hot keys supported by SIPp.
Interactive commands offer more flexibility than the hot keys. They are single line
commands which require the command mode. The command mode can be entered
by the hot key “c”. The list of interactive commands is shown in Table E-2.
To control the SIPp tool, there are two approaches provided. The first way is
using the interactive command line. The SIPp process can be controlled by passing
the commands using keyboard. Hot keys can be executed directly in any screens,
while other commands must be used once the process is in the command mode.
The other way to execute the commands is through the controlling UDP socket.
Each SIPp instance listens to a specific UDP socket. This allows SIPp to be
remote-controlled. The commands can be sent to this controlling socket in order to
control the traffic generation. The controlling socket can accept both hot keys and
interactive command described above. The commands must be prefaced with the
letter c, for instance, cset rate 5.
The unit of rate which is controlled by those commands is number of calls per one
period of time. The default value of the period if not specified otherwise is 1000 ms
or 1 second. However, this period can be adjusted by the startup parameters.
SIPp can take an external XML scenario file as a startup parameter. The scenario
file specifies the sequence of SIP messages to be sent and received. In addition, it
also defines starting and stopping points for timers, actions, logging events, etc.
The scenario file are passed through -sf option when starting SIPp.
13
The XML scenario file contains commands which are used to control SIPp
behavior. Within each command tag, there are numbers of attributes for further
adjustment. SIPp also provides keywords for constructing SIP messages in the
scenario file. The following subsections address more details about these elements.
[Link] Commands
Commands are used to instruct SIPp to perform certain tasks e.g. sending
and receiving SIP messages. The commands are in XML tags format. Some
basic commands are <send>, <recv>, and <pause>.
Apart from the basic commands, there are commands regarding distribution
of timers. <ResponseTimeRepartition> and <CallLengthRepartition> are
used to define the intervals of distribution counters. The distribution
counters will be shown in the display window. They can also be written to
an output file if -trace_stat parameter is used.
[Link] Attributes
Each command has its own attributes for fine-tuning the command as
shown in Table E-4, Appendix E. Besides the unique attributes for certain
commands, there are numbers of attributes which are applicable for every
command. The common attributes are listed in Table E-5, Appendix E.
[Link] Keywords
There are some keywords available for constructing SIP messages.
Keywords are always in square brackets, [ ]. These keywords will be
replaced by some values before the messages are sent. See Table E-6 in
Appendix E for available keywords.
14
2.2.5 Statistics
SIPp offers timers and many counters to keep track of the calls generated. These
statistics values can be saved to output files for further use. The available timers
and counters are as follows.
[Link] Counters
There are number of counters provided by SIPp. Two types of counters are
periodic (P) and cumulated (C) counters. The periodic counters are reset
every time after the statistic row is updated. The counters are dumped in
an output file of CSV format using -trace_stat parameter at startup. To
adjust the frequency of dumping these values to the file, -fd parameter is
used. Some important counters are shown in Table E-7, Appendix E.
15
SIPp provides various types of output files. To enable the output files, the startup
parameters need to be set. Some of the output files are stored in CSV format. CSV
format or comma-separated-values file is used for storing data in a table form.
Each line of a CSV file represents one row in the table. Within a line, data fields
are separated by commas. However, different separators can also be used instead of
a comma, for instance, a semicolon. The output file can be imported to a
spreadsheet application for further analysis or presentation. List of output files are
shown in Table E-8. Among all output files, two files which store the counters and
timers values are the statistics file, and the response time file.
As for the performance testing purpose, especially with high call rate, heavy traces
may affect the performance result. For example, usage of -trace_msg and -
trace_logs are suggested to be limited to debugging purpose only.
16
OpenSIPS provides a powerful scripting language for routing logic. OpenSIPS can
be configured by editing the configuration script which is loaded at execution time.
Certain important keywords, parameters, and functions are given in Appendix F.
The complete documentation of the scripting can be found in the website.
Keywords
The keywords are specific to SIP messages received by the server. These keywords
can be used in if statements for conditional decision. Significant keywords are
listed in Table F-1, Appendix F.
Parameters
The parameters are used for configuring the SIP server such as enabling or
disabling certain functionalities. Table F-2 in Appendix F contains key parameters
of OpenSIPS.
Functions
Functions can be used within the route blocks to manipulate SIP messages. The
route blocks are the core routing logic executed when a SIP message is received.
The functions used for configuring a simple SIP proxy can be found in Table F-3.
1
[Link]
17
2.4 EasyVPaBX
can use the same equipment for multiple PaBX accounts. Furthermore, the hosted
PaBX service promotes user mobility. A company can be geographically
distributed while using one single number for the entire company. [18]
The database in the middle is connected to both the telecom and the web parts. It
is used to store customer as well as user data including user numbers, application
logic strategies, profiles, parameters, statistics counters, etc.
The network exposure layer allows interactions between applications in the upper
layer, and network resources in the lower layer. This layer communicates with the
telecom application server using SIP protocol. There are the telecom network
exposure layer in the telecom part, and the web exposure layer in the web part.
3.1 Installation
3.1.1 Environment
3.1.2 SIPp
3.1.3 OpenSIPS
We compiled and installed OpenSIPS version 1.4.4 using the source file
([Link]) downloaded from [Link] We
specified /usr/local/ as the prefix for compilation and installation. The default
configuration file is put into /usr/local/etc/opensips/[Link]. And the
executable binary file is at /usr/local/sbin/opensips.
3.2 Scenarios
After we have installed the tools, we set up two communication scenarios. For the
first scenario, we use only the SIPp tool in the scenario. We connect two instances
of SIPp together, so the SIP participants talk to each other directly. With this set
up, we can see how the SIPp tool performs.
As for the second one, we insert the OpenSIPS as a SIP proxy between the two
participants. This scenario is more similar to the practical SIP-based
communication system.
We start with the scenario which makes use only the SIPp tool. In this scenario,
the caller (UAC) knows where the callee (UAS) is located. The caller initiates a
SIP session directly to the caller. Therefore, no intermediate proxy servers are
needed. To simulate the caller and the callee, two instances of SIPp are executed
on the same system. Therefore, they have to be bound to different addresses (i.e.
IP address and/or port number). Figure 3-1 shows SIP messages exchanged
between the two parties.
Caller Callee
[Link]:5060 [Link]:5060
INVITE
180 Ringing
200 OK
ACK
BYE
200 OK
From Figure 3-1, the caller first sends out an INVITE message. Then the callee
replies with a 180 Ringing response and a 200 OK response respectively. After
that, the caller sends an ACK back to the callee. At this point, the SIP session has
been established. In the real call, the media streams begin from this point on. To
emulate the call session, the caller waits for some time and sends a BYE message
to the callee to end the session. The callee replies with a 200 OK message, and the
call is terminated.
We created two XML scenario files ([Link], and [Link]) for SIP message
sequences at both parties. The diagram shown in Figure 3-2 illustrates a sequence
of commands in the scenario file for the caller. In addition, Figure 3-3 shows
commands for the callee.
Figure 3-2: Sequence of commands (simple UAC) Figure 3-3: Sequence of commands (simple UAS)
Using two virtual interfaces on the same machine, we bind the caller and the callee
to [Link] and [Link] at port 5060 respectively. As the calls are
generated by the caller, we control the call rate at the caller side, and also use the
statistic file produced by the caller. The target address of the caller is
[Link] at port 5060 (callee). The command for starting the caller is
Likewise, the target address of the callee instance is [Link] at port 5060
(caller). Therefore, the command for starting the callee is
We set the caller to generate SIP calls at certain rates using -r parameter. Call
rates are of calls per second (cps). With the -trace_stat parameter, The caller
periodically saves the counters and timers into the statistics file. The interval
between each update can be configured using -fd parameter.
The statistics file produced by the SIPp process is in the CSV format. The file is in
tabular form separated by a semicolon. Diagrams showing the number of successful
call attempts and the call response times are presented in section 3.3.
24
After we have set up the UAC and UAS using SIPp in the previous scenario, we
add another component to the scenario. In regular SIP systems, the caller has no
information about the exact location (i.e. IP address and port number) of the
callee. In order to make it more realistic, we introduce an intermediate party, a
SIP proxy server. A proxy server is responsible for forwarding messages to
corresponding parties. Hence, the caller and callee only need to know their SIP
proxy server.
The three parties, the caller, the callee, and the proxy exchange SIP messages as
illustrated in Figure 3-4. At the caller and the callee points of view, the sequence
of SIP messages remains the same as of the first scenario. Therefore, we can use
the same scenario files. However, the 100 Trying message generated by the proxy
server is sent to the caller after the INVITE message. Hence, we make a minor
change in the caller scenario file in order to support this message.
100 Trying
INVITE
180 Ringing
180 Ringing
200 OK
200 OK
ACK
BYE ACK
BYE
200 OK
200 OK
Figure 3-4: SIP messages between UAC, SIP proxy, and UAS
25
We configure the OpenSIPS tool as a SIP proxy. The SIP proxy listens to
[Link] at port 5060. Figure 3-5 shows some part of the OpenSIPS
configuration file ([Link]) used. For the routing logic, the OpenSIPS
accounts the INVITE message received and forward it to the callee ([Link]
port 5060) by replacing the address in the request URI.
…
listen=udp:[Link]:5060
…
route{
…
if (is_method(“INVITE”)) {
setflag(1);
rewritehostport([Link]:5060);
}
…
}
Figure 3-5: OpenSIPS configuration file (partial) for simple UAC and UAS
After the OpenSIPS proxy has been started, we start the caller and callee the same
way as in previous scenario. However, the target address must be changed to the
proxy ([Link] port 5060). The command for starting the caller is
The detail of the INVITE messages received and forwarded by OpenSIPS proxy
server is shown in Figure 3-7 and Figure 3-6 respectively. We can see that the
address in Request-Line is changed to the final destination address. In addition,
the Via and the Record-Route fields are added to the message header. The two
figures are taken from the network protocol analyzer application, Wireshark [22].
Figure 3-7: INVITE message received by the proxy Figure 3-6: INVITE message forwarded by the proxy
26
In this section, we perform the tests at different call generating rates ranging from
100 cps to 1000 cps. The averaged results from 10 repetitive experiments are
compared in the two diagrams below. Figure 3-8 shows the successful call attempts
per second, while the average response times are illustrated in Figure 3-9.
1000
Succussful Calls (cps)
800
UAC-UAS
600
400 UAC-proxy-UAS
200
0
0 200 400 600 800 1000
Target Call Rate (cps)
20
18
Call Response Time (ms)
16
14
12
10 UAC-UAS
8
6 UAC-proxy-UAS
4
2
0
0 200 400 600 800 1000
Target Call Rate (cps)
For the case of UAC and UAS, most of the call attempts are successful up to 1000
cps. On the other hand, when an OpenSIPS proxy is included, the successful call
starts dropping at around 400 cps. Regarding the response time, we can see that
adding an intermediate proxy increases the call latency by small degrees. However,
significant differences take place after 500 cps.
27
From the result in the last section, we can see that the scenario which involves an
OpenSIPS proxy failed to process all requests at target rates higher than 400 cps.
This limitation must be related to the OpenSIPS process in some ways. Therefore,
we investigate deeper into the configurations of OpenSIPS. We find out that the
memory allocated to the OpenSIPS process at startup influences the number of
call requests it can process successfully.
1200
1000
Succussful Calls (cps)
800
128 MB
600
64 MB
400 32 MB
16 MB
200
0
0 200 400 600 800 1000 1200
Target Call Rate (cps)
As we can see that OpenSIPS has some capacity limitations, using it in any
performance evaluation should be done with this in mind. Otherwise, the results
may be affected by this boundary.
28
From the experiments, we see that SIPp can produce SIP messages according to
the XML scenario file. It also provides many timers as well as statistic counters
captured from the calls generated. SIPp is really flexible and can be configured in
many ways to suit different testing purposes. For these reasons, SIPp is
appropriate for evaluating various SIP equipments. However, using and controlling
SIPp requires deep knowledge about the tool. In addition, the result statistic file
produced by SIPp may not be convenient to interpret directly. Further processing
in a spreadsheet application can help promote the understandability. Nevertheless,
it introduces new complexity in evaluating a system.
Regarding the performance aspect, SIPp can generate SIP traffic and capture the
statistics of the traffic at very high rate (thousands of calls per second). On the
other hand, OpenSIPS which acts as a proxy server has some limitations. Even
though it is claimed to handle hundreds of calls per second, the maximum number
of calls is most likely determined by the amount of allocated memory as
experimented in section 3.3. Therefore, users must ensure that performance
evaluation tools are capable of handling more intense traffic than the target system
before using them. This is to avoid a mistaken result caused by the constraints of
the evaluation tool itself.
SIP Performance Evaluation Framework
4
In the previous chapter, we studied the existing tools, SIPp and OpenSIPS. This
chapter handles the design and development of a performance evaluation
framework. We start with the overview of the framework in section 4.1. Then the
requirements of the framework are addressed in section 4.2. Following the
requirements, the detailed design of the tool is explained in section 4.3. The last
part, section 4.4, describes the implementation of the framework. The user manual
of the SIP performance evaluation framework can be found in Appendix A.
The performance evaluation framework aims to provide better usability for system
testers. Predefined scenarios embedded in the framework can help cutting down
the time needed for editing XML scenario files. The graphic user interface reduces
the complexity of test configurations. The framework also displays the test results
as graphical diagrams for easier result interpretation. In addition, the diagrams are
real-time updated as the test is progressing.
The overall view of the framework is shown in Figure 4-1. The performance testing
tool works with an instance of SIPp, while users interact only with the tool using
graphic user interface (GUI). The tool creates a shell script with SIPp startup
control commands
read write
parameters according to the configurations specified by the user. Once the shell
script is executed, it starts up a new instance of SIPp. The SIPp process generates
SIP requests towards the target system. All SIP messages between the SIPp
process and the target system are transmitted through a SIP proxy implemented
using OpenSIPS.
Once the traffic generator is started, the application controls the traffic during the
evaluation by sending control commands to the traffic generator. The result file
from the traffic generator is periodically read by the application. Graphical
diagrams are then created and displayed to the user.
There are two performance metrics we are focusing in this thesis, the system
capacity, and the call setup time. The capacity of the target system is the number
of requests which can be processed properly within a period of time. A properly
serviced request refers to a successful call served by the system.
To measure the capacity of a system, calls are generated and targeted to the
system at various call rates. The maximum call rates of which the system can still
serve the requests can be considered as the capacity of that system.
The other aspect of performance that should be supported by the framework is the
call setup time. The response time of a call is the time it takes to get an answer
back from the target system. In this thesis, we refer the time between sending an
INVITE message out and receiving the corresponding 200 OK reply as the
response time.
31
In summary, to measure the system capacity and call setup time, the framework
must be able to capture the response time of SIP calls as well as the number of
successful SIP calls. Moreover, it must be configurable to generate SIP calls at
different call rates to facilitate the measurement of the system capacity.
4.2.2 Scenarios
The SIP performance evaluation framework should support two scenarios. The
traffic generator generates a sequence of SIP messages according to the scenario
selected by users. The users do not need to study the SIP sequences or construct
the XML files themselves. In this way, the predefined XML scenario files can
shorten the time for configuring the test.
In this thesis, we take the EasyVPaBX as the target system. The EasyVPaBX
receives a call initiated from a caller, and forwards that call to the corresponding
callee. There are two scenarios which we cover, the simple call, and the queue.
To study the sequence of SIP messages in the two scenarios, we use a SIP soft
phone application to generate a call to the destination server. During the call, we
captured SIP messages transmitted between the soft phone and the server using a
network traffic analyzer. The tools we used for this purpose are SJphone [23] and
Wireshark [22]. From the captured sequence of messages, we draw a diagram
consisting of different participants of the call session. The following subsections
explain in details about the two scenarios.
The server maintains two SIP sessions when the call is active. One session is
between the caller and the server denoted by the green arrows, while the
other session is between the server and the callee denoted by the orange
arrows. The server terminates the call session when either side hangs up.
32
The caller sends SIP messages to the server through a SIP proxy. In
addition, the call created by the server targeted at the callee is also via a
SIP proxy. Normally, they can be two different proxy servers. However, the
EasyVPaBX server tested in this thesis sends SIP messages to a callee
through the same SIP proxy as the one it receives a call from the original
caller. Therefore, the SIP proxy used in the test must have address
information of the server (EasyVPaBX) as well as the callee.
BYE
BYE
200 OK
200 OK
BYE
BYE
200 OK
200 OK
[Link] Queue
The queue scenario is slightly different from the simple call. When the
server receives a new call from the caller, it tries to find the corresponding
callee. If the callee is available, the server creates a new call session to the
callee. Otherwise, the call is placed in a waiting queue. During its time in
the waiting queue, the caller receives some audio messages. The audio
playback is originated from a media server. The SIP server (EasyVPaBX)
contacts the media server every time it has a new call waiting in the queue.
Once the destination is accessible, the server then initiates a call to the
callee, removes the call from the waiting queue, and the session between the
caller and the callee is then created.
One example of this scenario is a customer service center. The call center
has one public phone number where customers can call to get the service.
When at least one officer (callee) is available, the call is served immediately.
If there is no available officer, the customer is told to hold the line.
Afterwards, the customer will get connected with a vacant officer.
180 Ringing
200 OK
200 OK
BYE
200 OK
INVITE
INVITE
100 Trying
200 OK
200 OK
ACK
ACK
ACK
ACK
BYE
BYE
200 OK
200 OK
BYE
BYE
200 OK
200 OK
Graphical user interface (GUI) allows users to interact with computer programs in
easier way compared to the command line interface (CLI) which has a steep
learning curve. With CLI, users are required to enter commands through the
command line. This could be complicated and time consuming since command
words may not be easily memorized by users. On the other hand, GUI offers
windows, icons, menus, and a pointing device for simpler control over applications.
Despite the fact that SIPp provides number of functionalities and configurations
and can be used for testing various SIP systems, it is available only in CLI mode
as discussed earlier in section 3.4. Starting, controlling, as well as monitoring the
result of SIPp have to be done with the command line. System testers need to
learn the commands and parameters in order to use the tool. In addition, the
results display is limited to text-based presentation.
4.3 Design
Following the requirements discussed earlier, this section give details the design of
the performance evaluation framework. Section 4.3.1 describes the components of
the framework. Then the user interface design is explained in section 0.
4.3.1 Components
The framework provides a graphic form for evaluation specifications from a user.
The configuration parameters specified by the user are used for generating a
startup script as well as controlling the behavior of the traffic generator. Once the
script file has been created and executed, an instance of SIPp will start generating
SIP traffic towards the target system through the SIP proxy.
During an evaluation, the SIPp instance keeps listening to a particular UDP port
called control port for run-time commands. In order to control the traffic
generated by the SIPp process, the traffic controller opens a connection to this
control port. Based on the configurations specified by the user, the traffic
controller sends control commands such as increasing or decreasing the call rate
and pausing the call generation to this port.
For performance measurements, the SIPp process captures statistic counters and
timers, and writes the result to an output file. This file is retrieved by a result
updater. Furthermore, statistic values in the file are extracted and processed. As a
result, the user can monitor the real-time updated graphical diagrams created from
the output file.
37
The graphical user interface provided by the framework can be divided into two
parts, the parameters configuration, and the results display. The following
subsections give details about them.
Scenarios
For the SIP scenarios, there are two options, the simple call, and the queue.
The selected choice determines the XML scenario file to be used for
generating SIP traffic to the target system.
User can specify the IP address of the local system as well as the port
number used to send out the SIP messages. The destination number, IP
address and port number of the target system are also configurable.
Scenarios
Load Pattern
Load Pattern
There are two patterns of traffic available, the fixed rate, and the increasing
rate. For the fixed call rate, user defines the rate of the traffic to be
generated, and the duration of the test.
As for the increasing case, user gives parameters such as the start call rate,
the final call rate, and the increasing step to define the traffic pattern. In
addition, between different rates, the traffic can be paused for some amount
of time which is configured by the pause time. The period of each call rate
is identified by the active time. For both load patterns, the frequency of
result updating can be specified in the polling interval field.
Figure 4-6: Successful/Failed calls diagram Figure 4-7: Call failure diagram
Figure 4-8: Response time diagram Figure 4-9: Call length diagram
39
4.4 Implementation
Java Environment
SIPp
The application does not include the SIPp tool inside. Nevertheless, an instance of
SIPp is created when the tool starts the test. Therefore, it is required that SIPp is
properly installed in the system. The application in this thesis has been tested with
SIPp version 3.1. Other versions of SIPp may also be functional with the tool as
well, but this is not assured.
Proxy Server
The complete test system requires a proxy server as shown earlier in Figure 4-1.
For the application to run properly, a proxy server which forwards SIP messages
to the target system must be configured. In this thesis, we set up the OpenSIPS
version 1.4.4 to perform this task.
Library Files
The SIP performance evaluation framework comes with certain scenarios. These
SIP scenarios are defined by XML scenario files included in the application. The
files are copied to the testing directory before the test is started. As stated earlier
in the requirements section, the simple call, and the queue scenarios are embedded
in the tool. The following scenario files are created according to the two SIP
sequences discussed in section 4.2.2.
4.4.3 Threads
With the thread concept, programmers have better control over concurrent
executions. For instance, an application which requires responsiveness to users’
interaction may need multiple threaded programming. While one execution thread
is busy with long running task or has to wait for an input/output event, another
thread can handle the users’ interaction. Therefore, the application will not freeze
during the completion of the time consuming tasks.
Most of the tasks listed above need to be done concurrently. For easier
management, we divided them into multiple threads. Considering Java as a
programming language used in developing the framework, we can straightforwardly
implement these threads using Java. Since the Java Virtual Machine allows an
application to have multiple threads of execution running concurrently [28].
For the application, we implement three threads, the main thread, the control
thread, and the result update thread. Because the latter two threads have certain
blocking events, we split them from the main thread to prevent the tool to halt
while waiting for those tasks.
The main thread deals with interfaces and interactions with user and also manages
the other threads. The control thread is responsible for sending commands to the
SIPp instance. The result update thread periodically reads the output file for
statistic values. Additionally, it processes them and generates result diagrams.
42
All steps preformed in the main process do not require much time compared
to the tasks in the other two threads. In other words, all the tasks in the
main thread are not blocking or having to wait for certain events. Hence,
from user’s point of view, the main process which is responsible for
interaction and interface is always responsive.
43
The frequency of reading the result file is specified by the user. It matches
with the result writing event of the SIPp process. The thread waits for a
specific amount of time and updates statistic values from the file.
Furthermore, it processes these values and plots several graphs. These tasks
go on iteratively until the test ends.
At the end of the test, the main process sends termination signal to this
thread. The thread stops reading and processing the result. Additionally,
before the thread is terminated, it exports the final diagrams to image files
for further usage.
44
This step is a part of the main thread (section [Link]). When the user chooses to
start the test, all configuration parameters are collected and stored in the
application. Certain parameters are used as startup options passed to the SIPp
process. Other parameters instruct the control thread which is created after the
SIPp process has been started.
}catch(Exception e){[Link]();}
return [Link]();
}
The tool prepares for the new test by creating a new directory containing the
scenario file and some other necessary files. The directory name consists of the
current date and time for its uniqueness.
A new shell script is generated within the directory. This shell script contains the
command to start a SIPp process as well as startup parameters. To make the SIPp
process controllable from the application, a control port must be identified when
starting the process. The application finds an available UDP port, and adds -cp
parameter following by the UDP port number in the script file. Putting collected
configurations into the shell script is illustrated in Figure 4-11.
45
After the shell script is written, the tool starts a configured SIPp process by
running the shell script. Since the SIPp is started in background mode (denoted by
the -bg parameter in the script), the result of executing the script is the process ID
of the SIPp. This process ID is stored in the application for later use. Creation of
the new directory, copying the files, generating, and executing the shell script file
are achieved using the execute method. Once the test is started, the application
creates two new threads, the control thread, and the result update thread.
After starting the SIPp process, a new thread, control thread (section [Link]), is
created. This thread sends control commands to the SIPp process. The commands
are packetized and sent to the UDP port which is configured as the control port in
the last step.
Load pattern parameters collected previously are passed to the control thread. The
final call rate, the increasing step, the active period, and the pause period
determine the commands and the specific time they are sent out. Figure 4-12
shows an example of simplified Java code which sends the command to the control
port periodically.
46
do{
try{
sleep(activeTime);
if(pauseTime>0){
//send the pause signal
[Link]("p", IP, port);
sleep(pauseTime);
}catch(Exception e){}
Reading the statistics file is a part of the result update thread (section [Link]).
Statistics file contains statistics and timer values. The file is updated periodically
by the SIPp process. The application keeps reading this file until the test
completes. The frequency of reading the file is identified by the polling interval
parameter given by the user.
The statistic file is in a tabular format. One line of the file is read at a time, and is
divided into fields. The values which we are interested are stored for further
processing. These values include elapsed time, current call rate, number of calls
created, number of successful/failed calls, call response time, and total call length.
Processing values from the statistics file, and plotting them as graphical diagrams
are also done within the result update thread (section [Link]). Statistics values
and timers are grouped by the call generation rate. For each call rate, the averages
of the values are calculated. These processed data are put in proper datasets for
graph plotting.
47
Apart from displaying real-time updated diagrams during the test, this thread also
exports the final diagrams to image files for later use after the test has been
completed. These images are saved in the working directory.
48
EasyVPaBX Performance Evaluation
5
In this chapter, we set up certain systems as target systems. We consider various
configurations including single computer, and load balancing scheme with two
computers. Various computers are used to see how EasyVPaBX performs in
different environments.
This chapter starts with section 5.1 giving details of target system configurations
as well as the user system which hosts the performance evaluation framework.
Following that, lists of computer specifications used in the configurations are
described in section 5.2. The performance results from multiple experiments are
presented in section 5.3. Performance data from the target systems are then
compared and discussed in section 5.4 and section 5.5 respectively.
On the right hand side of the figure lays the target system. The target system
consists of one computer. An application server is installed in the computer for
hosting the EasyVPaBX application. We also installed the Oracle WebLogic SIP
Server version 3.1 [30] as the application server. The EasyVPaBX is deployed in a
managed server which is controlled by the administration server. As for the data
storage, we employ the MySQL [31] database. The server accesses application
data in the local database installed on this computer.
Outbound and inbound SIP traffics take place between the SIP proxy and the SIP
server (EasyVPaBX). The two systems are connected to the same local area
network (LAN) with the Fast Ethernet standard supporting traffic at 100 megabits
per second (100Mbps).
51
Figure 5-2 illustrates the system configuration for testing a load balancing scheme.
In addition to the configuration of the single computer, the second computer is
inserted. The two computers, machine 1 and machine 2, in the target system
process SIP requests simultaneously. Similar to the last configuration, machine 1
contains the application server as well as the database. Machine 2, which is newly
added, is installed with the same application server. The application server
contains a managed server hosting another instance of EasyVPaBX. This managed
server shares the same administration server in machine 1. Furthermore, the
application server in machine 2 also uses the database installed in machine 1.
Slight modification is made to the SIP proxy in the user system to support load
balancing. The configuration files of the SIP proxy are edited so that the proxy
forwards SIP requests to two SIP servers. Therefore, the SIP traffics happen
between the SIP proxy and the SIP server in machine 1, as well as between the
52
proxy and the SIP server in machine 2. The three components, the user system,
machine 1, and machine 2 are connected to the same local area network (LAN)
with the speed of 100 Mbps.
Figure 5-3 shows some parts of the OpenSIPS configuration file used in this setting
as well as the file [Link] used within the configuration file. In the
configuration file, the module [Link] is loaded in order to enable the
ds_select_dst method.
From Figure 5-3, the first request will be forwarded to the address in the first line
([Link] at port 5061), while the second request will go to the second
address ([Link] at port 5061). The next request will again be destined at
the first address, and so on.
From the last section, there are two types of the target system explained, the
single computer, and the two computers with a load balancer. This section defines
in more details, the computers used in each configuration.
For the first configuration, the single computer, four computers are tested
individually. The performance results of these computers are then evaluated. As
for a better comparison of the performance testing results between the two
configurations, two identical computers are needed. From Table 5-1, we can see
that machine C and machine D share similar specifications both in hardware and
software. For these reasons, the two computers are used in setting up the second
configuration, the two computers with a load balancer.
54
We use the performance evaluation framework to generate SIP traffic, and capture
the performance results. The results presented in this section are averaged values
from multiple experiments. For each configuration, we perform 10 rounds of
evaluation. We use the increasing load for evaluating the throughput of the target
system. The traffic rate starts from 2 calls per second (cps), and ends at 20 calls
per second. The call rate is incremented by 2 cps step. For each call rate, the test
lasts for 180 seconds. The statistics values are updated every 20 seconds. The
results of different configurations are shown in the following subsections. All
diagrams shown in this section are produced by the framework after the evaluation
has been completed.
Figure 5-4: Number of calls and call setup time diagrams (Machine A)
Call Rate (cps) Successful (cps) Failed (%) Call Setup Time (ms)
2 2 0 73
4 4 0 74
6 6 0.01 76
8 8 0.01 82
10 10 0.00 98
12 12 0.03 115
14 14 0.08 137
16 16 0.04 201
18 18 0.07 243
20 13.65 31.76 3289
Table 5-2: Average Statistics (Machine A)
55
Figure 5-4 shows two diagrams from one of the performance evaluation carried out
on machine A. From the left diagram, we can see that the successful calls dropped
after the call rate reaches 18 cps. In addition, after this call rate, the call response
time increases significantly as shown in the diagram on the right hand side.
Figure 5-5: Number of calls and call setup time diagrams (Machine B)
Call Rate (cps) Successful (cps) Failed (%) Call Setup Time (ms)
2 2 0 58
4 4 0 69
6 6 0.03 74
8 8 0.12 121
10 10 0.08 474
12 10.95 8.72 3451
14 8.24 40.83 5289
16 5.93 62.91 6077
18 5.38 70.14 6124
20 4.54 77.29 6608
Table 5-3: Average Statistics (Machine B)
From Figure 5-5, at 10 cps call rate the number of open call starts to rise. From
this point on, the successful calls are decreasing. At 10 cps, most of the call setup
time is larger than 200 milliseconds. The call setup time grows dramatically
afterwards.
56
Figure 5-6: Number of calls and call setup time diagrams (Machine C)
Call Rate (cps) Successful (cps) Failed (%) Call Setup Time (ms)
2 2 0 76
4 4 0.01 75
6 6 0.03 89
8 7.2 9.97 4735
10 5.67 43.28 7861
12 1.70 85.84 17583
14 1.36 90.28 18608
16 1.27 92.07 17569
18 0.87 95.19 17241
20 0.93 95.35 17813
With machine C, the unfinished call in the system starts increasing after 8 cps as
displayed in Figure 5-6. The number failed call escalates at this point as well.
After that, most of the calls are failed, only small number of calls can be processed
by the target system.
57
Figure 5-7: Number of calls and call setup time diagrams (Machine D)
Call Rate (cps) Successful (cps) Failed (%) Call Setup Time (ms)
2 2 0 84
4 4 0.02 89
6 5.67 5.46 126
8 6.10 23.75 6476
10 4.42 55.93 8235
12 1.41 88.27 12685
14 1.13 91.93 13972
16 0.58 96.42 14391
18 0.56 96.89 13876
20 0.57 97.14 15197
Table 5-5: Average Statistics (Machine D)
Machine D has the same specifications as machine C. The performance results are
also similar to the results of machine C. As shown in figure, most of the calls can
be processed at 6 cps. The call setup time, and the number of failed call get
considerably higher after 8 cps.
58
Figure 5-8: Number of calls and call setup time diagrams (Machines C, D)
Call Rate (cps) Successful (cps) Failed (%) Call Setup Time (ms)
2 2 0 156
4 4 0.01 130
6 6 0.06 138
8 7.97 0.54 165
10 9.47 5.29 184
12 10.43 13.08 568
14 11.74 16.17 1743
16 12.52 21.75 5897
18 8.11 54.94 9256
20 8.33 58.37 9248
From Table 5-2, Table 5-3, Table 5-4, Table 5-5, and Table 5-6 in section 5.3, we
draw three comparison diagrams. Figure 5-9 and Figure 5-10 illustrate the number
of successful calls and the failure percentage at different call rate respectively.
From Figure 5-9, machine D started dropping some requests after 6 cps. Machine
C, which has the same specification as machine D can process the requests at 6
cps, but the failure rate start rising after that.
The load balancing scheme which make use of both machine C and machine D
performed well up to 8 cps. Small number of call rejections occurred after 10 cps
and it grew afterwards.
Among the five configurations, machine A has the best result. It can handle call
requests at 18 cps. Even though the clock speed of machine A’ processor is lower
than others, but the fact that the processor composes of two processing core is
most probably be the reason for this.
20
18
16
Succussful Calls (cps)
14
12 Machine A
10 Machine B
8 Machine C
6
Machine D
4
Machine C+D
2
0
0 2 4 6 8 10 12 14 16 18 20
Target Call Rate (cps)
100
80
Failed Calls (%)
Machine A
60
Machine B
40 Machine C
Machine D
20
Machine C+D
0
0 2 4 6 8 10 12 14 16 18 20
Call Rate (cps)
Apart from the successful and failure percentage, we also compare the call setup
time of various systems. The comparison is presented in Figure 5-11 below. For all
the single computer configurations, the call setup times at 2 cps are around 70 to
80 milliseconds. Then they get longer at higher request rates.
The load balancing setting, on the other hand, obviously has bigger response time
(130 milliseconds) compared to the single computer settings. The reason behind
this may due to the shared database which is resided on one of the computer.
Access to data in remote database requires longer time than the local one.
800
700
600
Call Setup Time (ms)
500
Machine A
400 Machine B
300 Machine C
200 Machine D
0
0 2 4 6 8 10 12 14 16 18 20
Call Rate (cps)
For every configuration, the call setup time jumps dramatically after certain
points. The huge increase of the call setup time indicates that the target system
cannot process most of the call immediately. Some of the requests are then queuing
up to be served by the system. After this point, waiting requests become more
intense and the system then start rejecting certain amount of them. Considering
Figure 5-10 and Figure 5-11, we can see that the rising of call setup time relates to
the point where failed requests occurred.
The successful/failure percentage as well as the call setup time measured by the
framework can be used to determine the maximum capacity of the target system.
For example, if we define the acceptable failure rate and the maximum call setup
time to be 10% and 250 milliseconds 2 respectively, the system capacity for each
configuration can be determined as highlighted rows in Table 5-7.
Machine Call Rate (cps) Failed (%) Call Setup Time (ms)
16 0.04 201
A 18 0.07 243
20 31.76 3289
6 0.03 74
B 8 0.12 121
10 0.08 474
4 0.01 75
C 6 0.03 89
8 9.97 4735
4 0.02 89
D 6 5.46 126
8 23.75 6476
8 0.54 165
C+D 10 5.29 184
12 13.08 568
Table 5-7: Maximum capacity for different configurations
The capacity shown in the table is only one example of result interpretation. The
appropriate criterion can vary from system to system.
2
The default timer for retransmission of lost packets in SIP is 500 milliseconds. We choose 250
milliseconds as a time allowed for the target system to process the request. Since the experiments
performed did not consider the network delay, we leave some space for this network delay in the
real environment. However, the appropriate threshold must be defined based on thorough studies
62
Regarding the system capacity, the framework developed can generate SIP traffic
at different rate. It can measure the number of call attempts successfully processed
by a target system. These results from different rate are then used to determine
the system capacity. As for the call setup time, the framework records the time
taken from the first INVITE request until a corresponding 200 OK reply is
received. This is configured in the XML scenario files composed in section 4.2.2.
Examples of the two measurements are presented earlier in section 5.3.
The two scenarios (i.e. simple call, and queue) were embedded in the framework.
We created the two XML files based on SIP sequences illustrated in Figure 4-2
and Figure 4-3. These two files were contained in the specific directory in the
framework. They are used as a parameter to the traffic generator.
For starting up the traffic generator, the startup parameters have to be specified.
With SIPp, users are required to type all the parameters through a command line
as shown in the left side of Figure 6-1. On the other hand, the framework provides
a form where users can select and specify configurations for the evaluation.
In addition to the startup parameters, two embedded scenarios are provided by the
framework. Therefore, users do not have to compose the XML scenario files
themselves. Moreover, the framework can be configured to increase or pause the
traffic generation during the evaluation while with SIPp, users have to explicitly
insert the command to control the traffic.
SIPp offers only the text-based interface. The performance results are presented in
tabular form as in the left side of Figure 6-2. The developed framework improved
the presentation by introducing graphical diagrams as shown in the right side of
the figure. The graphical diagrams are easier and more convenient for result
interpretation. In other words, this graphic interface promotes the user-friendliness
of the performance evaluation framework.
65
6.3 Discussions
Multimedia call sessions can be separated into two planes, a control plane and a
media plane. SIP defines a set of messages in the control plane. These SIP
messages are used for signaling establishment, modification, and termination of call
sessions. The media session is handled by other protocols (e.g. RTP) and is not a
part of SIP. As mentioned in the scope of this thesis work in section 1.2, the
performance evaluation framework only deals with SIP call sessions. SIP traffics
generated by the framework do not contain any media data. Therefore,
performance results produced by the framework are based on SIP signaling alone.
Media data in each call session can create variations in the performance, thus
additional study about the idea may be considered for more accurate results.
SIP traffics generated are forwarded to the target system by a proxy server (e.g.
OpenSIPS). The call session is established when the target system creates another
SIP session with a final call recipient. Therefore, the proxy server and the call
recipient are necessary parts of the performance evaluation framework.
Nevertheless, they are not included inside the developed application. Even though
it seems more convenient embedding them to avoid additional steps for manual
configurations of these components, excluding them can be more flexible. A system
with its own proprietary SIP proxy or call recipients can also be evaluated using
the framework.
Apart from the issues discussed above, the performance evaluation framework can
facilitate the measurements of the successful/failure rate of call requests, and the
call setup time of SIP-based telecommunication systems. These performance data
are used for defining the capacity of such systems. In addition, the framework
comes with an easy-to-use graphical interface which promotes usability and
understandability in evaluating performance of a system.
Conclusions
7
7.1 Summary
In this thesis, we studied the available tool which can be used for performance
evaluation of a SIP system. In addition, the necessary components such as a SIP
proxy and call recipient were also taken into account. SIPp and OpenSIPS were
chosen as an evaluation tool, and a proxy respectively. Number of experiments had
been carried out with these elements. They were then put together to found a basis
of the performance evaluation framework.
References
[5]. Evaluating SIP Server Performance. Erich M. Nahum, John Tracey and
Charles P. Wright. San Diego, California, USA : ACM, June 2007. Proceedings of
the 2007 ACM SIGMETRICS International Conference on Measurement and
Modeling of Computer Systems. ISBN 978-1-59593-639-4.
[6]. Stephan Wanke, et al. Measurement of the SIP Parsing Performance in the
SIP Express Router. Lecture Notes in Computer Science. s.l. : Springer Berlin /
Heidelberg, 2007, pp. 103-110.
[7]. The Throughput Performance of SIP Session at Different Call Rates and
Maximum Header Length. Ling-Feng Chiang, Cheng-Chi Yu and Jiang-Whai
Dai. 2005. International Symposium on Communications (ISCOM 2005) .
[8]. SIP Parsing Offload: Design and Performance. Jia Zou, et al. November
2007. Global Telecommunications Conference, 2007. GLOBECOM '07. IEEE. pp.
2774-2779. ISBN 978-1-4244-1043-9.
[9]. Alan B. Johnston. SIP: Understanding the Session Initiation Protocol. 2nd
Edition. s.l. : Artech House, 2004. ISBN 1580536557.
[16]. Gintel AS. EasyVPaBX Product Sheet. s.l. : Gintel AS, 2008.
[34]. Dorgham Sisalem, Jiri Kuthan. SIP Tutorial. s.l. : [Link], Tekelec, March
2007.
72
Appendix A
User Manual
To install the framework, one executable JAR file ([Link]) and two
subdirectories (/lib and /predefined) must be placed in a destination folder. In
order to start the framework, execute the JAR file. The graphical user interface of
the framework will appear as shown in Figure A-1.
After the test has been completed, the four diagrams are written in the newly
created folder. Figure A-2 shows the output image files from the framework.
<send retrans="500">
<![CDATA[
INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [field0] <sip:[field0]@[remote_ip]:[remote_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 1 INVITE
Contact: sip:[field0]@[local_ip]:[local_port]
ServiceKey: 183
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
]]>
</send>
<send>
<![CDATA[
]]>
</send>
<send>
<![CDATA[
BYE [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [field0] <sip:[field0]@[remote_ip]:[remote_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 2 BYE
Contact: sip:[field0]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<recv response="200" crlf="true"></recv>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200" />
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000" />
</scenario>
76
Appendix C
Queue Scenario File
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "[field0].dtd">
<scenario name="Basic Sipstone UAC">
<User variables="q" />
<send retrans="500">
<![CDATA[
INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [field0] <sip:[field0]@[remote_ip]:[remote_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 1 INVITE
Contact: sip:[field0]@[local_ip]:[local_port]
ServiceKey: 183
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
]]>
</send>
<action>
<ereg regexp="snowshore" search_in="msg" case_idp="true" assign_to="q"/>
</action>
</recv>
<send>
<![CDATA[
]]>
</send>
<send>
<![CDATA[
]]>
</send>
<send>
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_Record-Route:]
[last_CSeq:]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0
]]>
</send>
<send>
<![CDATA[
BYE [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: [field0] <sip:[field0]@[remote_ip]:[remote_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 2 BYE
Contact: sip:[field0]@[local_ip]:[local_port]
Max-Forwards: 70
Content-Length: 0
]]>
</send>
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200" />
</scenario>
Appendix D
SIP Miscellaneous
Method Description
INVITE Session setup
ACK Acknowledgement of final response to INVITE
BYE Session termination
CANCEL Pending session cancellation
REGISTER Registration of a user’s URI
OPTIONS Query of options and capabilities
INFO Mid-call signaling transport
PRACK Provisional response acknowledgment
UPDATE Update session information
REFER Transfer user to a URI
SUBSCRIBE Request notification of an event
NOTIFY Transport of subscribed event notification
MESSAGE Transport of an instant message body
PUBLISH Upload presence state to a server
Class Description
1xx Provisional or Informational
Request is progressing but not yet complete.
2xx Success
Request has been completed successfully
3xx Redirection
Request should be tried at another location
4xx Client Error
Request was not completed
because of an error in the request
5xx Server Error
Request was not completed
because of an error in the recipient
6xx Global Failure
Request has failed and should not be retried again
Parameter Description
-bg run SIPp in background mode
-ci set the local control IP address for remote-controlling
-cp set the local control port for remote-controlling
-d set the length of the calls in millisecond, default is 0
-f set the statistics report frequency, default is 1s
-fd set the statistics dump frequency, default is 60s
-i set the local IP, default is the primary host IP
-inf inject values from an external CSV file
-l set the maximum number of the simultaneous call
If this number is reached, SIPp pause the traffic generation until open
call number is less than this.
Default value is 3 x call length x call rate.
-m the number of total call to be generated
-max_retrans maximum UDP retransmission
Default is 5 for INVITE message, 7 for others.
-p the local port number of this SIPp.
Default is random free port
-r the initial call rate
-rate_scale the rate step used for hot keys
-rp the rate period, default is 1000 ms
-sf use the external XML scenario file
-sn use the embedded scenario
-trace_msg save sent and received SIP messages to the log file
-trace_err save unexpected messages to the log file
-trace_stat save all statistics to the file
-trace_counts save individual message counts to the file
-trace_rtt save all the response times to the file
Table E-1: SIPp startup parameters
Command Description
dump tasks Save the list of active tasks to the error log
set rate X Set the call rate to X
set rate-scale X Set the step of rate as used by hot keys +,-,*,/
set users X Set the number of users
set limit X Set the open call limit
set index <true|false> Display message indexes in the scenario screen
set display <main|ooc> Change the displayed scenario
trace <log> <on|off> Turn log on or off
Table E-2: SIPp interactive commands
82
Attribute Description
start_rtd starts one of the Response Time Duration timers
Rtd stops one of the Response Time Duration timers
repeat_rtd allows the timer to be counted more than once
Clrf prints an empty line on the display screen
Next jumps to another part of the script
test (used with next) jumps to another part of the script only if the variable is set
chance (used with test) adds probability to jump to another part
Condexec executes the command only if the variable is set
condexec_inverse executes the command only if the variable is not set
Counter increments the specified counter
Keyword Description
[service] Service field, as passed in the -s service_name
[remote_ip] Remote IP address, as passed on the command line.
[remote_port] Remote IP port, as passed on the command line.
[transport] Depending on the value of -t parameter, "UDP" or "TCP".
[local_ip] Will take the value of -i parameter.
[local_port] Will take the value of -p parameter.
[len] Computed length of the SIP body.
To be used in "Content-Length" header.
[call_number] Index. The call_number starts from "1"
and is incremented by 1 for each call.
[cseq] Generates automatically the CSeq number. The initial value is 1.
It can be changed by using the -base_cseq command line option.
[call_id] A call_id identifies a call and is generated by SIPp for each new call.
In client mode, it is mandatory to use the value generated by SIPp.
[routes] If the "rrs" attribute in a recv command is set to "true",
then the "Record-Route:" header received is stored
and can be recalled using the [routes] keyword
[next_url] If the "rrs" attribute in a recv command is set to "true",
then the [next_url] contains the contents of the Contact header
[branch] Provide a branch value which is a concatenation of magic cookie
(z9hG4bK) + call number + message index in scenario.
Counters Description
StartTime Date and time when the test has started.
LastResetTime Date and time when periodic counters where last reset.
CurrentTime Date and time of the statistic row.
ElapsedTime Elapsed time.
CallRate Call rate (calls per seconds).
IncomingCall Number of incoming calls.
OutgoingCall Number of outgoing calls.
TotalCallCreated Number of calls created.
CurrentCall Number of calls currently ongoing.
SuccessfulCall Number of successful calls.
FailedCall Number of failed calls (all reasons).
OutOfCallMsgs Number of SIP messages that cannot be associated.
Retransmissions Number of SIP messages being retransmitted.
ResponseTime Time between two commands specified in the XML file.
CallLength Duration of an entire call.
Table E-7: SIPp statistics counters
Keyword Description
from_uri the URI in the From header in the received SIP message.
e.g. if(from_uri~=”.*@[Link]”)
method the SIP method of the message.
e.g. if(method==”INVITE”)
src_ip the source IP address of the SIP message.
e.g. if(src_ip==[Link])
src_port the source port number of the SIP message.
e.g. if(src_port==5060)
uri the request URI of the SIP message.
e.g. if(uri~=”[123]+.*@[Link]”)
Table F-1: OpenSIPS important keywords
Parameter Description
alias to set alias hostnames for the server.
e.g. alias=[Link]
children to set the number of children to fork for the UDP interfaces
in the case that fork parameter is enabled. (default value is 8).
e.g. children=16
debug to set the debug level. Higher values result in more log messages.
e.g. debug=3
fork to enable or disable the daemon mode which allows one process
for each network interface and each protocol.
When disabled, the openSIPS is bound to the terminal as a single process.
e.g. fork=no
listen to set the network address that OpenSIPS should listen to.
Multiple values can be assigned to this parameter to make
the SIP server listens to more than one address.
If it is omitted, the server will listen to all interfaces.
e.g. listen=udp:[Link]:5060
loadmodule to load the module specified as the parameter.
e.g. loadmodule “db_mysql.so”
mpath to set the path for OpenSIPS to look for modules.
e.g. mpath=”/usr/local/lib/opensips/modules”
modparam to modify the value of a parameter.
e.g. modparam("usrloc", "db_mode", 2)
port to set the port OpenSIPS should listen. (default value is 5060)
e.g. port=5061
Table F-2: OpenSIPS key parameters
86
Function Description
rewritehost() to substitute the domain part of the request URI
with the value specified. Other parts remain unchanged.
e.g. rewritehost(“[Link]”);
rewritehostport() to change the domain part and the port number of the request URI.
Other parts such as username remain unchanged.
e.g. rewritehostport(“[Link]:5090”);
rewriteport() to change the port number of the request URI.
e.g. rewriteport(”5090”);
rewriteuri() to change the whole request URI.
e.g. rewritepath(“sip:abc@sipserver:5090”);
setflag() to mark the current SIP message for further processing.
The flag parameter can be in the range from 1 to 31.
e.g. setflag(1);
isflagset() to test if the current SIP message is marked with the flag.
e.g. isflagset(1)
strip() to strip the first n characters from the username in the request URI.
e.g. strip(5);
ds_select_dst(set, alg) to choose the destination from the provided set of addresses
based on different algorithms. The first parameter indicates
the set number. The latter specifies the algorithm used
in selecting one instance in the set.
This method belongs to the dispatcher module ([Link]).
e.g. ds_select_dst(“2”, “0”);
Table F-3: OpenSIPS important functions