Fulltext01 PDF
Fulltext01 PDF
Fulltext01 PDF
Examensarbete 30 hp
Oktober 2012
PraveenKumar Bhadrapur
The FE HSS/HLR prototype was designed and developed using Erlang /Open Telecom
Platform (OTP). The prototype developed is capable of handling Diameter queries
from the Application Server (AS) and Call Control State Function (CSCF) in the IMS
domain and provides HLR database access in the GSM domain. Performance analysis
of the third-party tools, components and the prototype was carried out to evaluate
real-time characteristics.
I have to thank few people who have helped complete my thesis successfully. First of all, I would like to thank
Jonas Falkevik, Software Designer, Mobile Arts AB supervisor for my thesis work. Jonas was of great help with
technical ideas and providing necessary feedback for the completion of thesis work. I would like to thank Mobile Arts
AB, Stockholm for providing the required infrastructure and encouragement throughout the thesis duration at their
premises.
I would like to thank Master‘s program thesis coordinator Olle Eriksson at Uppsala university. Justin Pearson, Senior
Lecturer at Uppsala university was reviewer of the thesis work. Thank you Justin for reviewing the thesis work.
Finally, I would like to thank all my friends who I have learnt from and have provided necessary support. I would like
to express gratitude to my mother late Smt. Savitri Bhadrapur, my father Shri. Gurusiddappa Bhadrapur and my
brother Pradeep Kumar Bhadrapur.
1
Contents
1 Introduction 10
1.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3 Out of scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4 Related work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.1 3Gdb Home Subscriber Server (HSS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.4.2 Open Source IMS Core (OSIMS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.4.3 Resilient and optimized Lightweight Directory Access Protocol (LDAP) database implementa-
tion for a large scale Home Location Register (HLR)/ HSS . . . . . . . . . . . . . . . . . . . . 13
1.5 Document organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2 Technical background 16
2.1 IMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.2 IMS subscription model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2.3 Diameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.4 GSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.5 Abstract data-structure for GSM subscriber data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2.6 Mnesia . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.7 Third-party tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.7.1 Basho-bench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.7.2 Erlsom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.7.3 eLDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2
4.4.2 End-to-end Diameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.4.3 End-to-end RPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.5 Global System for Mobile Communication (GSM) HLR database API . . . . . . . . . . . . . . . . . . 48
4.6 Performance analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.6.1 Diameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.6.2 End-to-end diameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.6.3 End-to-end RPC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.7 Capacity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.8 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.9 Load balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5 Conclusion 58
5.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.2 Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
A Sequence Diagrams 62
A.1 Diameter Cx procedure sequence diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
A.2 Diameter Sh procedure sequence diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
C Erlang configuration 74
List of Figures
A.1 Location Information Request (LIR)/Location Information Answer (LIA) sequence diagram. . . . . . . 62
A.2 User-Authorization Request (UAR)/User-Authorization Answer (UAA) sequence diagram. . . . . . . . 63
3
A.3 Server-Assignment Request (SAR)/Server-Assignment Answer (SAA) sequence diagram. . . . . . . . . 64
A.4 Multimedia-Auth Request (MAR)/Multimedia-Auth Answer (MAA) sequence diagram. . . . . . . . . 65
A.5 Registration-Termination Request (RTR)/Registration-Termination Answer (RTA) sequence diagram. 66
A.6 Push-Profile Request (PPR)/Push-Profile Answer (PPA) sequence diagram. . . . . . . . . . . . . . . . 66
A.7 Profile-Update-Request (PUR)/Profile-Update-Answer (PUA) sequence diagram. . . . . . . . . . . . . 67
A.8 User-Data-Request (UDR)/User-Data-Answer (UDA) sequence diagram. . . . . . . . . . . . . . . . . . 68
A.9 Subscribe-Notifications-Request (SNR)/Subscribe-Notifications-Answer (SNA) sequence diagram. . . . 69
A.10 Push-Notification-Request (PNR)/Push-Notification-Answer (PNA) sequence diagram. . . . . . . . . . 70
List of Tables
4
5
Glossary
6
IP Implementation Proposal
LDAP Lightweight Directory Access Protocol
LIA Location Information Answer
LIR Location Information Request
LMSI Local Mobile Station Identity
MAA Multimedia-Auth Answer
MAP/C Mobile Application Part C
MAP/D Mobile Application Part D
MAP Mobile Application Part
MAR Multimedia-Auth Request
MB megabyte
MCC Mobile Country Code
MC Multicall
MGC Media Gateway Controller
MG Media Gateway
MSC Mobile-service Switching Center
MSISDN Mobile Subscriber ISDN Number
MSS Mnesia Subscriber Server
MS Mobile Station
NAI Network Access Identifier
NGN Next Generation Network
OAM Operation, Administration and Maintenance
OP Operator Variant Algorithm Configuration Field
OSIMS Open Source IMS Core
OS Operating System
OTP Open Telecom Platform
P-CSCF Proxy Call Session Control Function
PNA Push-Notification-Answer
PNR Push-Notification-Request
PPA Push-Profile Answer
PPR Push-Profile Request
PSI Public Service Identity
PS Packet Switch
PUA Profile-Update-Answer
PUR Profile-Update-Request
RAM Random Access Memory
RFC Request For Comment
RPC Remote Procedure Call
RTA Registration-Termination Answer
RTR Registration-Termination Request
S-CSCF Serving Call Session Control Function
SAA Server-Assignment Answer
SAR Server-Assignment Request
SCCP Signaling Connection Control Part
SCTP Stream Control Transmission Protocol
SCUDIF Service Change and UDI/RDI Fallback
SIM GSM Subscriber Identity Module
SIP Session Initiation Protocol
SNA Subscribe-Notifications-Answer
SNR Subscribe-Notifications-Request
SS7 Signaling System 7
SS Supplementary Services
SVN Subversion
TCP Transmission Control Protocol
TMSI Temporary Mobile Subscriber Identity
UAA User-Authorization Answer
UAR User-Authorization Request
UDA User-Data-Answer
UDR User-Data-Request
URI Uniform Resource Identifier
7
VLR Visitor Location Register
VM Virtual Machine
XML Extensible Markup Language
XSD XML Schema Definition
eMLPP enhanced Multi-Level Precedence Pre-Emption
8
9
Chapter 1
Introduction
In the field of telecommunication, extensive technological advancements have resulted in numerous services. The
number of subscribers accessing telecommunication services increased rapidly over recent past. Due to the increase
in the subscriber number and the number of services accessed via several technologies by the subscribers, effective
subscriber data management became vital in-order to sustain higher order growth. Subscriber data management is
one of the primary issues a multi-service telecommunication operator has to face. Strategic data consolidation in
case of subscriber data in-order to learn about the customer preferences for different services and telecommunication
solutions is of immediate need [30].
Global System for Mobile Communication (GSM) and IP Multimedia Subsystem (IMS) telecommunication technolo-
gies currently offer video, voice, call and location services to the subscribers. In order to perform subscriber data
management of the GSM and IMS subscribers, the telecommunication operator has to obtain the single view of the
subscriber data. Single view of subscriber data can be obtained by subscriber data consolidation. In order to consoli-
date subscriber data in the GSM and IMS domain the telecommunication operator needs to look into to the possibility
of reducing duplication in subscriber data. Home Location Register (HLR) in GSM and Home Subscriber Server (HSS)
in IMS are the central repository of subscriber data for a given home network.
Implementation of the HLR and HSS is specified by The 3rd Generation Partnership Project (3GPP) forum. A
subscriber can be both a GSM subscriber and an IMS subscriber. Separate standards specifications for HLR and
for HSS by 3GPP implies that in many cases the same subscriber data must be stored both in Home Location
Register (HLR) and in Home Subscriber Server (HSS). A common HSS/HLR product would minimize the amount of
subscriber data that gets duplicated. This would help in ensuring a telecommunication operator obtain a single view
of the subscriber data for GSM and IMS technologies.
Brief background
Mobile Arts has already developed an HLR product for GSM consisting of Front-end (FE) server terminating the Mobile
Application Part (MAP) protocol towards the Mobile-service Switching Center (MSC)/Visitor Location Register
(VLR)and a Back-end (BE) server including a GSM subscriber database using Mnesia [1] [24]. This HLR shall be
used as the product base for this thesis work.
In addition, this thesis work shall also be coordinated with another concurrent thesis work that aims to use the
Lightweight Directory Access Protocol (LDAP) in order to provide the GSM/IMS common subscriber database access.
The common subscriber database would store the static HLR/HSS subscriber data. The concurrent thesis work (please
refer to the Section 1.4.3) was done by Erik Grafström [28].
This thesis work required close cooperation with system design at Mobile Arts and the concurrent thesis work [1] [28]
(please refer to the Section 1.4.3). This thesis was therefore done mainly at Mobile Arts premises in Stockholm.
Goal
The goal of the thesis is to provide the HSS Front-end (FE) server and HLR database access API required towards
the common subscriber LDAP database. This would result in realizing a proof-of-concept for common HLR / HSS.
10
1.1 Purpose
The purpose with this thesis is to design and develop Front-end (FE) HLR / HSS server prototype. The HLR /
HSS Front-end (FE) server would require common static subscriber data access. Static data access is provided by
the common Back-end (BE) server. The common BE server uses Lightweight Directory Access Protocol (LDAP) to
provide resilient, highly-scalable database infrastructure. Details about the BE server is covered by the concurrent
thesis work (please refer to the Section 1.4.3).
The approach to investigate the possibility of implementing a common HSS/HLR product for GSM and IMS would
be to
1.2 Scope
The HLR/HSS designed will be able to meet the requirements of serving both IMS and GSM subscribers. To accomplish
the task of providing common subscriber data to both GSM and IMS subscribers, concurrent thesis titled Resilient
and optimized LDAP database implementation for a large scale HLR/HSS will be used as reference. More details
about the concurrent thesis can be found in the Section 1.4.3.
GSM scope
Scope of the thesis work in the GSM domain is represented by the following figure 1.1.
MAP INTERFACE
incoming
_dialog_
handler HLR
LDAP
utilities/
common HLR LOGIC HLR_DB_API
libraries
MNESIA Legend
outgoing Concurrent thesis work
_dialog_
handler Re-used
Thesis work
HLR database API for the GSM location, routing and Supplementary Services (SS) are in the scope of thesis work
[10] [7]. As shown in the figure the HLR database API would need integration with concurrent thesis work in-order
to access the static GSM subscriber data. The dynamic data access needed is provided by the in-memory Mnesia
database.
IMS scope
IMS HSS needs to serve data look-up queries just as in case for GSM HLR. The IMS HSS clients are the Call
Control State Function (CSCF) entities and Application Server (AS). The IMS HSS clients interact with the HSS via
Diameter protocol. Diameter is a peer-to-peer Authentication, Authorization and Accounting (AAA) protocol. More
information about Diameter protocol is covered in the Section 2.3.
11
Interrogating Call Session Control Function (I-CSCF), Serving Call Session Control Function (S-CSCF) entities inter-
act with the HSS through the Diameter Cx interface and vice-versa [11]. Application Server (AS) interacts with HSS
via the Diameter Sh interface and vice-versa [13].
IMS procedures over the Diameter Cx and Sh interfaces are in the scope [11, 13].
Prototype features
• Data design - This necessary in-order to classify the data into static subscriber data which can be served by the
common BE server and the dynamic data which can be served by the in-memory Mnesia database.
• Procedure handlers for IMS and data access API for GSM procedures [11, 13] [10]
• Product documentation
• Full Operation, Administration and Maintenance (OAM) support
3Gdb HSS provides a good overview about IMS HSS design and has minimal reference implementation [37]. 3Gdb
HSS work describes the IMS system, provisioning, subscription management, services, operator interface and simple
Mnesia database design for handling procedures over Cx and Sh Diameter interface. The 3Gdb HSS implementation
has no support for Diameter protocol and public service identities are not considered. The reference implementation
is for Diameter Cx interface, Diameter Sh interface is not considered for implementation.
This served as good initial reference for the thesis work. The performance and other non-functional requirements have
not been taken into consideration.
Subversion (SVN) link to browse through sample implementation can be found here [38].
12
1.4.2 OSIMS
OSIMS is open source implementation of the IMS Core Network (CN) components such as I-CSCF, S-CSCF, Proxy Call
Session Control Function (P-CSCF) and HSS undertaken by the Fraunhofer institute for research purpose. The motive
behind the OSIMS implementation is to provide a playground for testing of the IMS CN and develop IMS applications.
This work describes the reference design and implementation in-depth and as mentioned in the website performance
of the CN elements has not been the main motive and hence no performance metrics about the implementation are
provided [27].
Design of the reference implementation of the HSS by the Fraunhoffer FOKUS group can be found here [31] [26].
Web-based management console, Diameter stack implementation in Java backed by MySQL database, authentication
features, Diameter Cx, Sh, Zx interface implementations are the main features of this prototype.
1.4.3 Resilient and optimized LDAP database implementation for a large scale HLR/
HSS
The concurrent thesis Resilient and optimized LDAP database implementation for a large scale HLR/HSS was taken
up by Erik Grafström during the same period. The thesis work required close cooperation with concurrent thesis work
and required infrastructural support from Mobile Arts, Stockholm.
The concurrent thesis work will provide static subscriber data backed by the LDAP database. Concurrent thesis
supports database resilience, fault tolerance by using replication techniques provided by the OpenLDAP and concurrent
management of static subscriber data [32]. This thesis work will provide LDAP management tools necessary for the
operator to perform the subscriber management. More information can be found in the thesis report [28].
The common LDAP BE is essentially an OpenLDAP server designed to serve the static portions of GSM/ IMS
subscriber data in highly concurrent manner. Access to OpenLDAP server was primarily through eLDAP (Erlang
implementation of LDAP client) [36].
Technical background provides necessary information as preliminaries to read this thesis report. This section
provides brief overview of the IMS, GSM networks and their architectures, subscriber concepts of GSM and IMS
and relevant third-party tools (Basho-bench , eLDAP and Erlsom) used this in thesis work [18] [36] [39].
• LDAP DIT used for the BE LDAP schema is discussed briefly which explains the need for common BE.
Data duplication elimination is explained in this section.
• System overview about the scope of the thesis work. GSM, IMS protocol’s, interfaces which are under
consideration for implementation of the common HLR / HSS are highlighted.
• Design considerations for the prototype development are discussed. Constraints involving the third-party
tools is highlighted.
• Data design discusses the ideas behind the static/dynamic data convention and explains the relation between
data items and how the subscriber data is structured.
• System architecture contains the IMS HSS architecture, supervision structure and GSM HLR database API
implemented are discussed.
• Hardware on which the FE HSS prototype would be deployed.
• Software used for configuring the client and FE HLR/HSS server machines are briefly discussed.
• Component design covers the IMS HSS components to be developed, describing their functionality.
• Interface descriptions contains interfaces used between the IMS HSS components, Erlang Diameter appli-
cations and APIs used in the system.
13
Evaluation and testing describes the following
• Test framework used to conduct performance testing of the prototype components and end-to-end scenarios.
• Test data generated which served as necessary parameters to test Diameter Cx, Sh procedures and GSM
HLR database APIs. Test data generated helped conduct performance testing of the components and
system.
• Performance measurements.
• Performance analysis of the measurements observed carried out in-order to identity the bottle-necks in the
system.
• Capacity of the FE HSS node to serve 10000 IMS subscribers.
• Scalability aspects of the FE HSS.
• Load balancing mechanisms of FE HSS node cluster.
Conclusion Summary of the prototype developed, future enhancements possible to the components, third-party tools
and the prototype.
14
Chapter 2
Technical background
This section provides technical background about IMS and GSM concepts, terminologies and basic architecture.
IMS section 2.1 briefly discusses IMS as Next Generation Network (NGN). Need for an IMS network and its usage are
covered. IMS section 2.1 covers the the key elements of IMS network and its layered architecture. IMS HSS, S-CSCF,
I-CSCF and AS the roles and functionalities are briefly covered. The thesis scope is in the IMS domain is restricted
to HSS, S-CSCF, I-CSCF interacting over Diameter Cx interface and AS interacting over Diameter Sh interface.
Section 2.2 describes the relationship between the public identities and private identities of an IMS subscription.
Section 2.3 provides an overview of the Diameter protocol, Diameter applications Cx, Sh and how the Diameter base
protocol can be extended. Erlang Diameter Library provided as part of R15B release will be used for implementation
of the Diameter Cx, Sh applications.
Section 2.4 provides overview about the GSM networks, interfaces and the protocols among the Access Network (AN)
elements and CN elements.
Section 2.5 covers the hierarchical structure of the subscription model as described here [7].
Section 2.6 provides information about Mnesia as Distributed database and its usage for developing telecommunication
applications.
Section 2.7 provides information about the advantages and issues with third-party tools used in this thesis namely the
Erlsom, Basho-bench as testing tool and refers to eLDAP as third-party tool which was used in the concurrent thesis
work [28].
2.1 IMS
IMS is set of requirements and specifications as defined by 3GPP to provide a unifying architecture for Implementation
Proposal (IP)-based services over both packet-switched and circuit-switched networks. IMS uses standard IP protocols
as defined by the Internet Engineering Task Force (IETF) such as Session Initiation Protocol (SIP).
IMS network intends to provide circuit-switched network subscribers with services built and based on the Internet
applications, services and protocols. The intention of IMS network is to provide convergence and access to various
services such as data, voice, messaging, video and web related technologies to both fixed-line subscribers and wireless-
users in general so that growth of the internet with respect to services provided, quality of service results in enhanced
telecommunication usage.
As shown in the figure 2.1 IMS architecture basically composes of the service/application layer, IMS layer and the
transport layer. Service/application layer essentially consists of various AS. An AS can be SIP server serving multiple
IP Multimedia (IM) services and applications. SIP AS communicates with CSCF elements using SIP messages.
Example of an application server can be a presence server or a location server.
IMS provides services which are available both in the packet-switched (IP networks) and circuit-switched networks.
An IMS This is accomplished using the functionality elements such as the P-CSCF which acts as IMS entry/exit point
for an IMS network, S-CSCF element provides the required serving capabilities for an IMS subscriber in the home
network and I-CSCF acts as the contact, forwarding point to each of the operator’s network. The services applications
are hosted by the AS.
16
IMS HSS manages subscriber, service data and is the main database for an IMS network. In an IMS network, HSS
serves requests from the S-CSCF and the I-CSCF over the Diameter Cx interface. An I-CSCF can request an IMS HSS
for the identity of the S-CSCF currently serving a given public identity. S-CSCF can request to download user-profiles
from IMS HSS. AS can request for user-data download over Diameter Sh interface from the HSS. These interactions
over Diameter Cx, Sh interface can be referred in the figure 2.1. These are few of the many instances where HSS has
to serve the subscriber data, location related, authentication information of the identities. Functionalities expected
from an IMS HSS can be looked up here in the technical specification [4].
17
Public user
identity
Service
Profile
Public user identities can be implicitly registered as a group of public identities, this ensures that all public identities
are registered at the same time and similarly for de-registration. Some of the implicitly registered can be associated
with different services profile than the other in the same group. Sharing of the service profiles among the implicit
groups is allowed. A single public identity can also be shared among two or more private identities. More information
can be found here [9].
Public Service Identity (PSI) identifies a service, or a specific resource in an AS created for a particular type of service
[5]. Public service identity can take the form of SIP URI or a telephone URI. These identities are mainly used over
the Diameter Sh interface. Example for a PSI is sip:voicechat@it.uu.se.
Private service identity is similar in relationship to PSI as the IMPI is to the IMPU. Private service identity is
of the form NAI. This is usually operator defined and used in similar manner as the IMPI to register, de-register,
authenticate and authorize services [5].
2.3 Diameter
Diameter is AAA framework for applications used in the IMS network [33]. Diameter protocol is an extension and
enhanced version of the RADIUS protocol. The Diameter base protocol is defined in the Request For Comment (RFC)
3588. Diameter applications (Diameter applications here mean, a protocol which can extended) can be built over the
Diameter base protocol. Each such application is identified by the application-identifier. For example, Internet
Assigned Numbers Authority (IANA) has allocated Diameter Cx application, an application identifier 16777216.
Relationship of Diameter applications and Diameter base protocol is as shown in the figure 2.3.
Diameter Diameter
Cx Sh
Diameter base
protocol
Figure 2.3: Relation between Diameter applications and Diameter base protocol.
Diameter supports reliable transport protocols TCP and SCTP ([34]). Diameter base protocol provides delivery of
Attribute Value Pair (AVP)s. AVP are used to deliver data and every Diameter message is composed of the several
AVPs, some of which are mandatory [33]. Diameter applications can added their own AVPs if they are not defined as
part of the base protocol.
Diameter client can be a P-CSCF, which could perform access control. Diameter server can be a HSS which provides
AAA requests for the realm under consideration. A HSS has to support Diameter applications Cx, Sh in addition to
the base protocol in order to support both Diameter Cx clients I-CSCF, S-CSCF and Diameter Sh client AS.
Erlang/Open Telecom Platform (OTP) in the release R15B has provided Diameter base protocol implementation
version 1.1 [19]. Further in this thesis report, wherever Diameter discussions regarding the implementation are carried
out will refer to the Erlang/OTP R15B provided Diameter version 1.1 library.
18
2.4 GSM
GSM network typically consists of AN elements and CN elements. Mobile Station (MS), Base Transceiver Station
(BTS) and Base Station Controller (BSC) form the AN. MSC, VLR and the HLR form the CN.
BTS is the radio element which serves one cell. Typically a BTS has several trans-receivers which can serve several
different frequencies for a given cell area. BTS provides necessary signaling to BSC over Abis interface and media to
the CN. MS connect to the BTS over the Um interface. BSC handles number of BTS. It handles the administration of
BTS, cell data and location related data. BTS and BSC form the Base Station Subsystem (BSS). The Abis interface
used between the BTS and BSC consists of radio-link establishment and management procedures [3].
A MSC is connected to large number of BSC via the Mobile Application Part (MAP) A interface. Several protocols are
used between BSC and MSC over the A interface. Signaling Connection Control Part (SCCP) provides connection-
oriented and connectionless services as a lower layer protocol [2]. Base Station System Management Application
Part (BSSMAP), Direct Transfer Application Part (DTAP) protocols use SCCP as underlying protocol, all of these
protocols interact over the MAP A interface.
MSC is the main routing entity in the CN. Via the B interface it connects to the VLR. MSC uses Mobile Application
Part (MAP) B interface for interrogating the VLR during the location and call procedures execution.
MSC handles call-control, signaling and directs the Media Gateway Controller (MGC) to manage the resources per-
taining to the media services in a Media Gateway (MG). VLR stores temporary information such as Temporary Mobile
Subscriber Identity (TMSI) and handles location management, call related procedures and temporary subscriber data
for a given MSC area which pulled from the HLR.
HLR is the main database for given home network managed by the operator. HLR mainly stores permanent subscriber
data. HLR provides necessary interface to retrieve the subscriber data for a VLR over the MAP D interface. Gateway
Mobile Switching Centre (G-MSC) interfaces over MAP C interface to interrogate the HLR for subscriber information
and locating the MSC/VLR which is currently handling a given MS.
19
At least one Mobile Subscriber ISDN Number (MSISDN) is assigned to the mobile subscriber. MSISDN is typical
used for call-routing purpose. MSISDN is allocated such that it can be used as SCCP global-title address, which is
essential for the routing messages to the HLR which holds the subscriber data for a given MS.
Subscriber data consists of Basic service and SS information which determines the type of services provisioned for a
given subscriber. Basic services consist of Tele-services and Bearer-services. Several BSG have been defined for the
Tele-services and Bearer-services.
SS enhance the Basic services, they work on per BSG basis. Examples of SS can be a Call Forwarding Unconditional
(CFU), Call Forwarding No Reply (CFNRy).
2.6 Mnesia
Mnesia is distributed database primarily developed for telecommunication applications [24]. Mnesia was used in the
Random Access Memory (RAM) only mode for this thesis work. Mnesia provided dynamic data access to the FE HLR
/ HSS servers. Mnesia as distributed database provides transactional features the atomicity, consistency, isolation,
durability (ACID) properties which were used extensively. Mnesia features are listed in the reference manual [24].
Mnesia is bundled along the Erlang/ OTP release as a library. Erlang records are turned into the entries of the
respective tables in the Mnesia database. This close interoperability of Mnesia with Erlang/OTP with data-structures
such as Erlang records and for querying, the list comprehensions makes Mnesia a viable option for usage in our thesis
which is also a telecommunication application.
2.7.1 Basho-bench
Basho-bench provides a test framework for testing a huge number of highly concurrent Erlang processes which not
only stress test the system but also provide visual performance analysis of the tests run in terms of throughput,
latency(mean, median, percentile) metrics [18].
Basho-bench provides a mechanism to configure test runs and write customized drivers to test each Erlang process
or a component. Basho-bench was used extensively to test the FE components such as Erlsom, eLDAP, Diameter
components and to run end-to-end tests via Diameter protocol and via RPC.
Usage of basho-bench can be found in the Appendix B. Appendix B details about how to start a basho-bench test
and required drivers and configuration files to be written in order to run required tests.
Basho-bench as test-tool was run on one of the client machine using driver basho_bench_driver_null and configu-
ration parameters as shown in the table 2.1. basho_bench_driver_null driver shipped with the Basho-bench tool
tests the the basho-bench performance with minimum overhead.
Table 2.1 has results for the basho_bench_driver_null test.
Advantages
20
• Provides performance testing infrastructure with visual results in terms of throughput, latency as key metrics.
• Provides configuration and customized drivers for each of the test case required and provides test data (example:
for key generation).
• Max rate does provide an idea about the performance and behaviour of the server while the server is overloaded.
Drawbacks
• Does not provide required yield (required throughput) as depicted in the table 2.1.
This explains the minor inconsistency in providing required yield and affects the testing results observed with
minor error rate.
• Max rate, does not show the exact number of operations/sec possible. Some of the test runs revealed that
Central Processing unit (CPU) was not utilized completely when the test were run at the max rate.
• Memory utilization per concurrent worker is high. As derived from the table 2.1, a single worker uses around
1MB of memory.
• More information about test results such as CPU utilization, memory utilization and io for both the basho-bench
client and the system to be tested, would be nice to have it in one place for each test run.
2.7.2 Erlsom
The Erlsom library provides API’s to transform Erlang data structures into a Extensible Markup Language (XML)
governed by a schema. Erlsom is to be used to write XML strings according to the Diameter Cx XML schema and
the Diameter Sh XML schema using Erlsom‘s Data Binder mode [39].
Erlsom performance
Performance of the Erlsom XML parsing utility in-order to transform Erlang records into XML strings validated
against a schema has been tabulated in table 2.2 [39]. The schema for each of the interface Cx and Sh interface has
been specified in technical specification TS:29.228 and TS:29.328 respectively [11] [13] . Schema‘s serve as models
against which the generated the XML will be validated against. Minimal data was used to fill the required XML
records which was written as XML string. All the tests tabulated below had schema‘s pre-compiled into models. This
is done as it reduces the CPU computation required every time the schema‘s are compiled into models and the same
optimization has been used in the implementation of HLR / HSS. Rate at which each basho-bench concurrent worker
is 10 ops/sec. (worker - here is the driver code which transforms an Erlang record into an XML string as specified
by the schema). Number of concurrent workers in each of the tests has varied from 50, 100, 200 giving number of
operations per sec values 500, 1000, 2000 respectively.
Observation in the table 2.2 shows that with increase in the operations /sec the expected throughput on the test
machine is delivered and with less variation in latency. The CPU utilization goes up considerably and memory
utilization increases slightly.
21
Considerable increase in CPU utilization by the Erlsom with respect to operations/sec is of prime concern since the
procedures which use Erlsom extensively such as Cx/SAR , Sh/UDR, Sh/PUR, Sh/SNR will be bottle-necked for
CPU for other operations. This observation is discussed more in the end-to-end RPC Section here 4.4.3.
Erlsom allows pre-compilation of the schema into a model. A schema can once be pre-compiled and stored in memory to
be read later for validation when XML strings are written by the Erlsom. This optimization reduces CPU computation
considerably. CPU utilization reduction for Erlsom write calls needs to be investigated at moderate to high loads.
Advantages
• Ease of use.
• Schema to model transformation can be done once and re-used.
• Memory utilization for trivial data is not very high.
• Provides utility to get the record and fields for a given XML Schema Definition (XSD) schema.
erlsom:write_xsd_hrl_file() will get the necessary Erlang records for a given schema into a Erlang hrl file.
Drawbacks
• High CPU utilization is of prime concern as the number of operations/second increases. The increase is almost
linear, possible ways to reduce the near linear increase in CPU utilization needs to be investigated.
2.7.3 eLDAP
eLDAP [36] was used to connect to the BE OpenLDAP servers. eLDAP APIs were provided by the concurrent thesis
work 1.4.3. More about eLDAP API can be found here [28].
22
Chapter 3
This chapter covers the design and implementation aspects of the HLR/ HSS prototype.
The design of LDAP DIT in the section 3.1. The BE LDAP schema design in the concurrent thesis work 1.4.3 is based
on the DIT presented in the figure 3.1.
Section 3.2 provides the overview of the HLR/HSS prototype and functional blocks which required interfaces to be
designed. LDAP functional block from the FE HLR/HSS perspective is essentially eLDAP API interface provided by
the concurrent thesis work 1.4.3
Section 3.3 reflects on why Erlang/OTP was preferred language for implementation and classification of data between
the FE and BE. Erlang Diameter library, hardware constraints, need of Erlsom as third-party library are constraints
with which the prototype was to be designed and developed.
Section 3.4 has information about the dynamic data stored in the Mnesia tables. Fields of the tables are briefly
explained. The Mnesia tables and fields considered here are sufficient for the procedures of Diameter Cx, Sh interface
in IMS domain and to provide location, call-handling and SS procedures in the GSM domain.
Section 3.5 explains the sharing-nothing design of the FE HSS components. Interactions of the Diameter agents over
Cx and Sh interface, the procedure worker components, the HSS database API components and the HSS subscription
manager components are covered.
Section 3.6 provides the mapping between the MAP procedures which use the HLR database API resulting in corre-
sponding eLDAP queries or Mnesia database access or both.
The hardware specification of the machines used in this thesis are covered in the section 3.7.
Erlang/OTP as development environment and Operating System (OS) deployed on the test machines are covered in
the Section 3.8.
Components of the IMS HSS system described in the Section 3.2 are covered in more detail in the Section 3.9.
Interfaces description for the Diameter agents implemented using the Erlang Diameter library , HSS subscription
handling interfaces and the HSS database API are covered in the Section 3.10.
24
Figure 3.1: LDAP DIT of HLR/HSS static subscriber data.
By grouping IMS and GSM subscribers under the common group of Subscribers, data pertaining to charging, account-
ing, billing, some of authentication parameters and other common subscriber data can be stored once.
An operator would have common set of service profiles which could be served in the given home network. By generating
a common-set of service profiles which could be associated with most of subscribers, a large amount of data duplication
is avoided. Each service profile would have both GSM and IMS service profile. By mapping the members of the group
Subscribers to the group Profiles, the data to be managed would be significantly lesser than associating each subscriber
to a profile.
The number of service profiles would increase only if the operator would have set of services are newly added or a
new combination of services in a profile is requested. Service profiles are combination of the members from the group
Services. Since each service is uniquely identified by private service identity, a reference to the object of the service in
the profile is necessary and sufficient to create an association. Similarly an association between the object of subscriber
and service profile can be created by referencing to the service profile id of interest.
25
Figure 3.2: HLR/HSS system overview.
• The HLR/HSS is required to be standards compliant. Compliance has been achieved in design by basing the data
and component design on 3GPP specifications. Implementation of procedures according to the specifications
was primary requirement which has been met.
• Erlang Diameter stack has to be used since as described above Erlang/OTP is the preferred language and the
Erlang Diameter protocol is provided as library in the R15B release. Preferred development environment is
Erlang/OTP in Mobile Arts [19].
26
• Erlsom library was needed for some of the Diameter Cx and Sh procedures in-order to generate XML string
according to the schema specified in the specification TS:29.228 and TS:29.328 [39] [11] [13]. More details on
Erlsom can be found in Section 2.7.2.
• Hardware specifications are in the table 3.2 for the client and the FE HSS server. Performance measurements
of the components and the prototype were carried on the hardware mentioned in the table 3.2.
IMS operator data as seen in figure 3.3a is configuration data related to access control and network capabilities which
is set at start-up and mostly read while running. The data items in the operator data Mnesia tables enable the HSS
to handle Cx and Sh procedures.
IMS network data tables as seen in figure 3.3b are read/updated by Cx and Sh procedures. The grey objects(nested
records) as highlighted are sub-objects of the (outer nested records) black objects. Sub-records are contained within
the records. These records are needed to enable user registration and service registration over the Cx interface and
subscription notification handling for transparent data over the Sh interface.
as_permission_list
as_permission_list is operator data which contains permissions for each AS in the operator network. Allowed
operations are update, subscribe, receive transparent and non-transparent data over the Sh interface.
as_id is the Diameter name of a given AS.
data_ref_id is an identifier to transparent repository data or the non-transparent data.
allowed_operation as discussed above for a data_ref_id.
operator_specific_data
operator_id is the key used to retrieve information for a given operator network.
operator_id is a unique identifier for a given operator.
op is a 128 bit Operator Variant Algorithm Configuration Field (OP) used when generating authentication
vectors for users and is secret for a given operator. [15]
27
loose_route_ind_capability indicates if SIP loose routing mechanism is supported by the operator network.
hss_max_data_size indicates the maximum data size supported by the HSS while performing operations on the
user profile or user data over Diameter Cx and Diameter Sh interface respectively.
amf is a 16 bit Authentication Management Field (AMF) defined per operator and is used when generating
authentication vectors.
user_registration_info
user_registration_info has a wild-carded IMPU or a distinct IMPU as key. This table is used when serving
requests to verify the current state of a given IMPU, its current associated S-CSCF Name, implicit IMPU set,
authentication pending flag and sequence number.
(w)impu is in the form of a SIP URI.
impi is private identity of a given IMS subscriber and can be any URI.
is_auth_flag_pending is indicates if authentication pending for a given IMPU.
status reflects the IMPU’s current state: registered, unregistered or not-registered.
s_cscf_name is the Diameter name of the assigned S-CSCF.
implicit_impu is a list of the implicitly registered IMPU set.
sequence_number is the SQN HE part of the sequence number used in authentication.
service_registration_info
service_registration_info has wild-carded PSI as the key. It is used to retrieve information regarding the
current state (psi_activation_state) of a given PSI, the assigned S-CSCF and the private_service_ identity
associated with the PSI.
(w)psi is in the form of a SIP URI.
private_service_identity is private identity of a given PSI. It can be any URI.
psi_activation_state reflects the PSI’s activation state.
s_cscf_name is the Diameter name of the assigned S-CSCF.
sh_subscription_notify_info
sh_subscription_notify_info record contains information about the subscriptions to transparent or non-
transparent data made over the Sh interface. data_ref_id is the key and wild-carded/distinct IMPU, PSI and
as_id are in-dices for quick look-up.
data_ref_id identifies a transparent repository data item or a non-transparent data item. Refer to Table 7.6
in TS 29.328. [13]
(w)impu_(w)psi can be either a wild-carded/distinct IMPU or wild-carded/distinct PSI. It is a SIP URI.
as_id is the Diameter name of a given AS.
expiry_time is relative time used to indicate the expiration of the subscription after which no notifications are
sent.
private_identity(user_service) is a private identity of user or a service.
is_one_time_avp is used to denote if a notification is to be sent only once.
repository
repository has wild-carded or distinct PSI or wild-carded or distinct IMPU as the key. It contains a list of
repository_data records for which a given identity.
(w)impu_(w)psi can be either a wild-carded/distinct IMPU or wild-carded/distinct PSI, it is a SIP URI.
repository_data is a list of transparent data.
repository_data
repository_data has service indication as key which is a unique string used to identify a given service. Reposi-
tory data is semantically transparent to the HSS but not to the AS which is subscribing to the data. It contains
mainly service information which can be updated by the AS.
service_indication uniquely identifies a service.
service_data is data which is semantically understood by the AS.
sequence_number is used to update the service data and is maintained by the HSS.
28
HLR dynamic data
HLR dynamic data is a set of Mnesia tables comprised of GSM operator data seen in figure 3.4a and network data
seen in figure 3.4b. The grey objects(nested records) as highlighted are sub-objects of the (outer nested records) black
objects. Sub-records are contained within the records. GSM network data is accessed over the MAP using MAP/C
and MAP/D procedures and the operator data contains operator specific configuration data required to set up and
run a GSM network.
operator_information
operator_information has operator_id as key. This table contains the GSM operator information such as the
operating VLR list , HLR list, MSC list, supported services by MSC, pre-paging support, Automatic Device
Detection (ADD) functionality and domain selection support for a given HLR.
operator_id is the key and it is used to identify the operator.
operating_vlr_list is a list of active VLRs in the network.
operating_hlr_list is a list of active HLRs in the network.
operating_msc_list is a list of active MSCs in the network.
mcc is the operators Mobile Country Code (MCC).
supported_msc_services_list is a list of services supported by the MSCs in the operator network.
pre-paging_supported_supported_hlr is used to indicate if the HLR supports pre-paging.
hlr_add_functionality_supported indicates if the HLR supports ADD functionality.
hlr_domain_selection_supported indicates if the HLR supports domain selection among Circuit Switch (CS),
Packet Switch (PS) or other domains.
29
subscriber_status
subscriber_status information for a given IMSI contains status flags and other registration related parameters.
MSISDN is alternative index to make look-ups more efficient.
imsi is the key, used to uniquely identify a GSM Subscriber Identity Module (SIM).
msisdn is used for routing calls to a active MS
mnrf is flag to indicate if the MS is reachable or not.
lmsi is the associated Local Mobile Station Identity (LMSI) of an IMSI.
ms_purge_flag indicates if the MS’s subscriber data is purged by the operator.
check_ss_indication indicates if the subscription has SS to process.
roaming_info
roaming_info record is updated frequently when a MS moves from one VLR to another. The associated LMSI,
MSC are updated.
imsi serves as key to retrieve roaming information.
vlr_number is the E.164 number of the currently associated VLR.
msc_number is the E.164 number of the currently associated MSC.
lmsi is the associated LMSI for a given IMSI.
ss_profile
ss_profile record for a given IMSI consists of a list of SS provisioned and the registration data for SS.
imsi used as key to retrieve the provisioned SS list and SS registration data. provisioned_ss_list is a list of
provisioned_ss_features.
ss_registration_data contains registration information for a given IMSI applicable for all the provisioned SS.
provisioned_ss_features
provisioned_ss_features record contains information about one SS code.
provisioned_ss_code Provisioned SS code identifies the SS.
bsg is a list of BSG for which the SS code applies to.
ss_status is the current status of the SS code, which is kept in the ss_status record.
subscription_options is an option for Call Forwarding on mobile subscriber Busy (CFB), Call Forwarding on
mobile subscriber Not Reachable (CFNRc) and CFNRy.
override_category is an option for Calling Line Identification Presentation (CLIP), Connected Line identifi-
cation Presentation (COLP) and Calling Name Presentation (CNAP).
presentation_mode is an option for Calling Line Identification Restriction (CLIR)
max_entitled_priority is an option for enhanced Multi-Level Precedence Pre-Emption (eMLPP).
default is an option for eMLPP.
subscribed_max_cs_bearers is an option for Multicall (MC).
user_defined_max_cs_bearers is an option for MC.
ss_registration_data
ss_registration_data contains registration details for a subscribers SS profile.
password is the password which is used when registering a SS.
number_of_retries number of password retries allowed during registration.
controlled_password indicates if SS registration is controlled by user-password or by the service provider.
blocked indicates if the given IMSI is blocked from SS registration.
bsg
A BSG is identified by its bsg_code.
bsg_code is the BSG code, an example is AllTeleservices.
ss_status is the SS status of for this BSG, which is kept in the ss_status record.
forwarded_to_number is a SS option for this BSG which applies to SS CFB, CFNRc and CFNRy.
forwarded_to_subaddress is a SS option for this BSG which applies to CFB, CFNRc and CFNRy.
no_reply_condition_timer is a SS option for this BSG which applies to CFNRy.
30
ss_status
SS status is comprised of four state flags.
provision_state is set when the SS is provisioned by the service provider for a given IMSI. When subscription
for the SS is withdrawn the state is set to not provisioned. This can only be performed by the service provider.
The provisioning state shall be on a per subscriber basis, and hence the same for all basic service groups.
registration_state is set when the SS is registered by the service provider for a given IMSI or by the MS.
When the SS subscription is de-registered, the state is set as not registered. This can be done by either service
provider or the MS.
activation_state is set to either active and quiescent or active and operative when the SS is activated, not
active when the SS is deactivated.
induced_state is set as induced by the HLR for some of the SS where it is applicable.
authentication_info
A set of authentication vectors are stored in the HLR for a given IMSI.
imsi key to retrieve the authentication vectors.
challenge_data is a list is authentication vectors.
challenge_data
challenge_data contains all the data of a authentication vector, where item_num is the vector index.
item_num is the index of the authentication vector.
rand is a 128 bit random number used for calculating the challenge and response.
sres is a 128 bit authentication challenge.
used_indicator indicates if the authentication data vector has been used before.
number_of_retries is the number of retries allowed for a certain challenge.
31
IMS Control Plane HSS
mnesia_worker
s-cscf_diameter_agent
scscf_diameter_client
scscf_diameter_client_cb hss_cx_diameter_client_workers
operator_interface
hss_cx_deregister
scscf_diameter_server hss_subscription_manager
scscf_diameter_server_cb hss_cx_update_subscr_data
hss_t_data_ hss_nt_data_
subs_server subs_server
hss_sh_diameter_server_workers
IMS Service Plane
hss_sh_pull
hss_subs_handler
as_diameter_agent hss_sh_diameter_agent
as_diameter_client hss_sh_diameter_server hss_sh_update
as_diameter_server hss_sh_diameter_client_cb
hss_sh_diameter_client_workers
as_diameter_server_cb hss_sh_diameter_client hss_sh_notif
Mnesia
Legend
Cx HSS Server Call
Each Diameter agent can act as a Diameter client or a Diameter server. The IMS Control Plane consists of two Diameter
agents (i-cscf_diameter_agent and s-cscf_diameter_agent) which interacts with the HSS hss_cx_diameter_agent.
This interaction of the IMS Control Plane Diameter agents over the Diameter Cx interface is highlighted shown in
figure 3.5.
The IMS Service Plane consists of as_diameter_agent which would interact with the HSS hss_sh_diameter_agent.
This interaction of the IMS Service Plane Diameter agent over the Diameter Sh interface is also highlighted in figure
3.5.
Diameter applications can be configured to have separate call-back modules or the same call-back can be configured
to handle both Diameter applications Cx, Sh (As previously mentioned in the Section 2.3, Diameter application here
refers to the Diameter protocols Cx, Sh extended over the common Diameter base protocol). Reason for choosing
separate call-backs for each of the application is to have modularity and understand the performance characteristics
of each Diameter application procedure calls, which were run in isolation.
Each of the Diameter agents (client and server) would register Diameter application as a service. For example, the
Diameter agent, I-CSCF could register a Diameter Cx application as service and AS, a Diameter Sh application as
a Diameter service. The corresponding application (Cx or Sh) would be started as service by the HSS Diameter
agent. The Erlang Diameter stack provides connection setup over TCP or SCTP transport protocols. After the
connection set up between two Diameter agents, the client Diameter agent (for example an I-CSCF) can send Diameter
commands to the server Diameter agent(HSS listening to the Diameter Cx application messages). The Diameter agent
(HSS) serving as service application spawns a call-back process for each of Diameter message received. Each received
Diameter command/request received spawns a procedure worker process. The procedure worker process spawned
executes the procedural logic as defined in 3GPP TS 29.228 for Cx procedures and TS 29.328 for the Sh procedures
[11, 13]. The process design pattern of the hss_cx_diameter_server_workers, hss_cx_diameter_client_workers,
hss_sh_diameter_server_workers, hss_sh_diameter_client_workers is a gen_server behaviour or regular Erlang
code. Diameter Sh application messages can be similarly passed on, between the Diameter agents configured as either
a server or client.
32
To execute the procedure logic, each of the workers interact with the hss_db module. The hss_db_api process is
spawned per process request. The hss_db_api process would spawn mnesia_worker process. hss_db_api process
interacts with the eldap_managerprocess to get the eldap_worker process to make LDAP queries. This would result
in high number of concurrent processes performing dynamic data operations on the Mnesia tables and static data
operation via LDAP for each of the procedure worker requests (refer to [28] for more information on the eLDAP
worker process management). After necessary procedural logic execution, an answer message would then be sent by
the corresponding Diameter call-back module process. Detailed sequence diagrams for each of the Diameter message
can be found in Appendix A. The sequence diagrams in Appendix A reflects the data access requirements for each
of the Diameter message without the notion of caching data from Mnesia or LDAP in the gen_server state. The
sequence diagrams for each of the diameter message shows explicitly the number of database look-ups required.
operator_interface module as shown in figure 3.5 is provided to perform administrative tasks on behalf of the
operator. The operator can perform subscriber management operations such as network initiated termination of
registration and updating subscriber data over the Diameter Cx interface. Other operator tasks such as handling
Mnesia configuration manager are performed. The details about the operator interface in more detail can be found in
section 3.9.5.
hss_db module consists of hss_db_api process which invokes a LDAP query for static subscriber data or a Mnesia
query for dynamic subscriber data. A Mnesia query would be passed to a Mnesia worker and it would on successful
update notify the hss_subscription_manager. A LDAP query would be passed to the eLDAP manager and the
result would be passed back. More details about the API can be found in Section 3.10.3. Process design pattern for
hss_db_api is gen_server.
hss_subscription_manager module is responsible for handling the update user-data/user-state by Cx and Sh interface
workers. hss_subscription_manager determines if an update of user data or user state for subscribed transparent
or non-transparent should trigger the notification procedures described in 3GPP TS 29.328. [13] More details about
exact handling of subscription and notification for non-transparent data is described in Section 3.9.4.
3.5.1 Supervision
Erlang/OTP provides supervisor behaviour, which is basically used in this thesis work to restart child/worker processes
based on the configuration for restart-strategies. Supervision provides clean way of restarting applications if the worker
processes under them die.
The IMS HSS supervision structure is shown in figure 3.6. hss_sup supervises the Cx Diameter agent supervisor
(hss_cx_diameter_agent_sup), Sh Diameter agent supervisor (hss_sh_diameter_agent_sup), operator interface
(operator_interface), (mnesia_sup) and the LDAP client supervisor (eldap_sup).
Cx Diameter agent supervisor (hss_cx_diameter_agent_sup) is responsible to handle supervision of the HSS Cx
Diameter server (hss_cx_diameter_server) and the HSS Cx Diameter client (hss_cx_diameter_client).
Sh Diameter agent supervisor (hss_sh_diameter_agent_sup) is responsible to handle supervision of the HSS Sh
Diameter server (hss_sh_diameter_server) and the HSS Sh Diameter client (hss_sh_diameter_client).
operator_interface monitors the eldap_connection_manager and mnesia_configuration_manager.
Mnesia supervisor (mnesia_sup) supervises the mnesia_configuration_manager and the LDAP client supervisor
(eldap_sup) supervises the LDAP client manager (eldap_connection_manager).
33
Figure 3.6: IMS HSS supervision structure.
IMS I-CSCF supervision structure is shown in figure 3.7a. I-CSCF supervisor (icscf_sup) is responsible for supervision
of the I-CSCF Diameter server (icscf_diameter_server) and the I-CSCF Diameter client (icscf_diameter_client).
IMS S-CSCF supervision structure is shown in figure 3.7b. S-CSCF supervisor (scscf_sup) is responsible for supervi-
sion of the S-CSCF Diameter server (scscf_diameter_server) and the S-CSCF Diameter client (scscf_diameter_client).
IMS AS supervision structure is shown in figure 3.7c. AS supervisor (as_sup) is responsible for supervision of the AS
Diameter server (as_diameter_server) and the AS Diameter client (as_diameter_client).
(a) IMS I-CSCF supervision struc-(b) IMS S-CSCF supervision struc- (c) IMS AS supervision structure.
ture. ture.
34
The HLR database API component is implemented as part of the thesis work. The HLR database API has access to
the static data from the LDAP database and dynamic data provided by Mnesia [24]. Please refer to the concurrent
work thesis report [28] for static LDAP database access details. Details about Mnesia table design for GSM can be
found in the section 3.4.
The below table provides an overview of the mapping of the MAP procedures, hlr_db_api calls to the corresponding
eLDAP queries and the dynamic data accessed which were implemented as part of the HLR database API component.
3.7 Hardware
To run and evaluate the system, one of the machine was configured as client with the specifications seen in table 3.2
and the other was hosting the HSS/HLR prototype.
35
3.8 Software
The client machine had Ubuntu 10.10, Erlang/OTP R15B01 compiled from source with the configuration shown in
Appendix C.
The HSS/HLR machine run Cent OS 5.5 , Erlang/OTP R15B01 compiled from source with the configuration shown
in Appendix C.
icscf_diameter_client as shown in the figure 3.5 starts a registered service and establishes a transport layer connec-
tion (TCP or SCTP) with the hss_cx_diameter_server. icscf_diameter_client would send a Diameter command
(such as UAR) to the hss_cx_diameter_server, this interaction over the Diameter Cx interface is highlighted as
shown in the legend. A call-back module hss_cx_diameter_server_cb is spawned for each Diameter message re-
ceived on the Cx interface. The UAR Diameter command is processed by the hss_cx_query_select_pull worker
process. The reply from the hss_cx_diameter_server_cb UAA is sent back to the icscf_diameter_client_cb
module. UAR/UAA interaction is shown in the sequence diagram A.2.
Similarly a LIR diameter message from the I-CSCF is handled by the call-back module hss_cx_diameter_server_cb.
The LIR Diameter message is processed and the LIR procedure is executed by hss_cx_location_query according to
the specifications [11].
LIR/ LIA interaction is shown in the figure A.1, the hss_cx_location_query worker handles the LIR/ LIA Diameter
command.
The SAR diameter command is sent by scscf_diameter_client and is processed by the hss_cx_put_pull worker
process. The reply from the hss_cx_diameter_server_cb SAA is sent back to the scscf_diameter_client_cb
module. SAR/SAA interaction is shown in figure A.3.
The MAR diameter command is sent by scscf_diameter_client and is processed by the hss_cx_authdatareq worker
process. The reply from the hss_cx_diameter_server_cb MAA is sent back to the scscf_diameter_client_cb
module. MAR/MAA interaction is shown in figure A.4.
The hss_cx_diameter_client worker processes can send PPR Diameter command or RTR commands which are
handled by the scscf_diameter_agent and call-back scscf_diameter_server_cb for each request is spawned. The
replies PPA and RTA are sent by the scscf_diameter_server_cb to the hss_cx_diameter_client_cb. PPR/PPA
sequence diagrams can seen in the figure A.6 and RTR/RTA in the figure A.5
36
3.9.3 AS Diameter agent
The as_diameter_client send Diameter commands over the Sh interface which are handled by the hss_sh_diameter_server
after the initial service start and connection setup.
The UDR Diameter command is sent by as_diameter_client and is processed by the hss_sh_pull worker pro-
cess. The reply from the hss_sh_diameter_server_cb UDA is sent back to the as_diameter_client_cb module.
UDR/UDA interaction is shown figure A.8.
The PUR Diameter command is sent by as_diameter_client and is processed by the hss_sh_update worker process.
The reply from the hss_sh_diameter_server_cb PUA is sent back to the as_diameter_client_cb module. PUR/
PUA interaction is shown in figure A.7.
The SNR Diameter command is sent by as_diameter_client and is processed by the hss_sh_subs_notif worker
process. The reply from the hss_sh_diameter_server_cb SNA is sent back to the as_diameter_client_cb module.
SNR/ SNA interaction is shown in figure A.9.
The hss_sh_diameter_client worker process sends PNR Diameter command which is handled by the as_diameter_agent
Diameter stack and callback as_diameter_server_cb module is spawned each request. PNA is sent by the as_diameter_server_
to the hss_sh_diameter_client_cb. PNR/PNA sequence diagrams is shown in figure A.10.
The hss_nt_data_sub_server registered process in hss_subscription_manager module would upon receiving update
on non-transparent data from the mnesia worker process in hss_db module spawn a hss_subs_handler process. The
hss_subs_handler process would verify if the non-transparent data update subscription is been currently supported
by performing a dirty read on hss_subscription_configuration. If the non-transparent data category subscription
is supported, the hss_subs_handler process would trigger the notification procedure hss_sh_notif worker process
in the hss_sh_diameter_client_workers module.
The hss_sh_update process in hss_sh_diameter_server_workers module triggers the hss_t_data_subs_server
process in the hss_subscription_manager module. The hss_t_data_subs_server process is responsible for trigger-
ing notifications for the subscribed transparent data. hss_sh_notif worker process in the hss_sh_diameter_client_workers
module is spawned to send PNR Diameter message.
Process design pattern for the hss_t_data_sub_server and the hss_nt_data_sub_server is gen_server.
Apart from triggering network initiated terminations RTR/RTA and push profile update PPR /PPA requests the
operator interface is able to manage resources such as the number of eLDAP client connections and the Mnesia
configuration parameters.
mnesia_configuration_manager process has procedures to create schema, initialize Mnesia nodes, create/reset/delete
required dynamic data tables, set operator information for IMS network. The operator information in figure 3.3b.
Process design pattern for mnesia_configuration_manager is a gen_server.
37
3.10.1 Diameter agent API
application attribute in the option list specifies the Diameter Application supported by the service, a dictionary
module which specified how to encode and decode the application messages and AVPs and call-back module
which handles the incoming the diameter messages for the given Diameter application. Erlang Diameter library
provides diameterc utility which transforms the diameter dictionary files into Erlang source code [20].
capabilities options can be specified using the AVPs, few of the options are included above ’Origin-Host’ - Value
of the Origin-Host ’AVP. ’Origin-Realm’ - Value of the Origin-Realm AVP in the out-going diameter messages.
’Vendor-Id’, ’Product-Name’ and ’Auth-Application-Id’ AVPs are sent as part of the CER / CEA messages.
• connect (ServiceName, TransportProtocolName) or listen(ServiceName, TransportProtocolName)
diameter_add_transport API is called when either a Diameter client or server wants to connect to Diameter
server or the Diameter server wants to listen for the Diameter client messages respectively.
Parameters to the diameter_add_transport API are ServiceName, connect|listen, TransportOptions.
Attribute transport_module takes the TransportProtocolName parameter as value. Local IP address and
Remote IP address, Remote port are specified as shown below in the transport_config attribute.
TransportOptions for listening transport (Diameter server).
[ { transport_module , sctp | tcp } ,
{ transport_config , [ { reuseaddr , true } ,
{ ip , Serve rLocal IPAdd r } ,
{ port , Port } ] } ] ;
• stop (ServiceName)
Stops the Diameter service.
• call(ServiceName, ApplicationAlias, RequestMessage, CallOptions)
To send a Diameter message, a Diameter agent uses the diameter:call(ServiceName, ApplicationAlias,
RequestMessage, CallOptions) API.
I-CSCF can send UAR, LIR Diameter messages, S-CSCF can send SAR, MAR Diameter messages and HSS as a
Diameter Cx client can send RTR, PPR Diameter messages to the S-CSCF Diameter server and as a Diameter
Sh client can send PNR Diameter message to the AS Diameter server.
38
Attribute ApplicationAlias is an alias which identifies the Diameter Application in the service configuration
passed while starting the service.
RequestMessage is the Diameter message passed, it consists of list of mandatory AVPs, optional AVPs and
conditional AVPs. List of the AVPs to be passed for Diameter message pertaining to the Diameter Cx application
can be referred here [12] and for Diameter messages pertaining to the Diameter Sh application here [14].
CallOptions can be referred here [19].
The hss_subs_handler module receives updates on the data, it needs to trigger PNR, is the data updated is subscribed
and the data subscription is allowed by the operator.
Updates on non_transparent data can be received from the Diameter Cx procedures and the transparent data,
non_transparent data updates are received from the Diameter Sh procedures.
update_notification(PublicIdentity, UpdatedData, UpdatedDataType) This API is called when the Diameter
Cx procedure updates data, the mnesia_worker generates cast to the hss_subs_handler module.
Upon receiving the update_notification, verify_supported_subs_data(UpdatedData, PublicIdentity) is called
to verify if the updated data is allowed for subscription. If the updated data is allowed for subscription, initiate_notification(
UpdatedDataType, SubsNotifRecordList, PublicIdentity) is called to notify the list of AS Diameter servers.
notify_transparent_data(PublicId, ServiceIndication) API is called when there is a update on the transparent
data for given the service indication (which identifies the type of service) by the PUR request or in some cases of SNR
requests.
As shown in the figure 3.5, every procedure worker would spawn hss_db_api worker. The hss_db_api makes both
static LDAP queries via the eLDAP component and the dynamic data access through the Mnesia database.
The table 3.3 and 3.4 covers the required Cx/ Sh procedures resulting into the eLDAP queries and Mnesia dynamic
data accesses.
39
Procedure HSS database API Dynamic data eLDAP query
check_public_identity_exists public_identity_exists
-
get_psi_activation_state -
service_registration_info
get_public_id_user_state -
user_registration_info
Cx LIR return_stored_scscf_name -
user_registration_info
get_server_capability_list -
operator_specific_data
terminating_services_related impu_exists
user_registration_info
at least_one_scscf_name_assigned private_identity_exists
private_user_identity_exists - impi_exists
user_identity_match - impi_exists
user_association - impu_exists
impu_barred - impu_exists
Cx UAR non_barred_implicit_impu - impu_exists
user_allowed_roam - impu_exists
user_allowed_register - impu_exists
return_stored_scscf_name user_registration_info -
atlst_impu_scscf_auth_pndng user_registration_info impu_exists
private_identity_exists - impi_exists
impu_exists - impu_exists
psi_exists - psi_exists
identity_association - imp(i)u_exists
is_distinct_impu - impu_exists
psi_activation_state service_registration_info -
return_stored_scscf user_registration_info -
store_scscf user_registration_info -
Cx SAR
set_unregistered_state user_registration_info -
set_registered_state user_registration_info -
associated_impu - impi_exists
impu_state user_registration_info -
set_not_registered_state user_registration_info -
is_hss_storing_scscf operator_specific_data -
download_user_profile - get_ims_profile
clear_scscf_name user_registration_info -
impi_exists - impi_exists
impu_exists - impu_exists
is_distinct_impu - impu_exists
user_association - imp(i)u_exists
Cx MAR get_auth_scheme_supported operator_specific_data -
return_stored_scscf user_registration_info -
get_auth_key_parameters operator_specific_data -
store_scscf_name user_registration_info -
set_auth_pending_flag user_registration_info -
40
Procedure HSS database API Dynamic data eLDAP query
check_as_permission as_permission_list -
impu_exists - impu_exists
Sh UDR impi_exists - impi_exists
multiple_impi_association - impi_exists
download_user_data repository -
Sh PNR remove_subs_data sh_subscription_notify_info -
check_as_permission as_permission_list -
impu_exists - impu_exists
Sh PUR impi_exists - impi_exists
is_distinct_impu - impu_exists
is_transparent_data_under_update repository -
check_as_permission
impu_exists
impi_exists as_permission_list -
get_sh_sub_notif_info - impu_exists
Sh SNR verify_service_data_exists - impi_exists
associate_as_notification - impu_exists
associate_as_notification_update repository -
deassociate_as_notification
download_user_data
41
Chapter 4
Evaluation of the HSS / HLR prototype and the performance tests conducted for the components and end-to-end
tests is described in this section.
Test framework for the performance evaluation is briefly described in the Section 4.1. Components developed as part
of the prototype, third-party components (Erlsom, Erlang Diameter Base Application) and end-to-end tests can be
conducted using the test framework. Please refer to Section 2.7 about third-party tools used in this thesis work.
Test data required to run the Diameter Cx, Sh procedures, HLR database API are provided by the Identity Server.
This involves conducting performance tests, the subscription data generation is explained in the Section 4.2.
Performance measurements for Erlang Diameter Cx, Sh Application components, end-to-end Diameter tests, end-to-
end RPC tests are covered in the Section 4.4.
The Section 4.5 provides details about the GSM HLR performance for the typical HLR database API calls primarily
mapped onto the eLDAP queries.
Performance analysis of the observed performance for Erlang Diameter applications are analyzed, bottle-necks are
identified in each of the tests. Performance analysis information is covered in the Section 4.6. Advantages and
drawbacks observed for the Erlang Diameter library for the Cx, Sh applications is highlighted.
Capacity requirements to serve 10000 IMS subscribers by a single FE HSS is derived and explained in the section
section:capacity.
Scalability of the FE HSS which is integrated with a BE node is noted in the Section 4.8. FE HSS scalability discussions
refer to the concurrent thesis work, to learn about the BE performance in terms of throughput, memory usage and
the number of subscribers handled [28]. Scalability of the system is discussed by extrapolating the numbers for 50000
IMS subscribers served using the FE HSS cluster and BE node in the Section 4.8.
Section 4.9 carries out discussion about the load balancing mechanisms which can be deployed when a FE HSS cluster
along with BE nodes is deployed.
42
Mean
Throughput
Host Workers Rate latency
(ops/sec)
(ms)
Basho-bench client 250 100 17800 1.2
Basho-bench client 500 500 40270 6
Basho-bench client 500 Max 41800 8
Any of the developed FE components can be run on FE HLR/HSS machine, examples are the Diameter components,
the complete HSS, the hlr_db_api part of the HLR. The topology allows drivers to be created and run at Basho-bench
client to test any code running at FE HLR/HSS. Example basho-bench driver and configuration can be found in the
Appendix B. The Basho-bench client machine can run I-CSCF, S-CSCF or AS and FE HLR/HSS machine can run
the HSS node to perform end-to-end tests.
The OpenLDAP server backed by the BDB is run on the BE OpenLDAP machine. The BE OpenLDAP machine is
run in non-replication, non-mirror mode for the evaluation of the FE HSS/HLR.
Identity Mnesia
Server (RAM)
Mnesia
Basho bench client FE HLR/HSS BE OpenLDAP BDB
(RAM)
43
4.3 Test scenarios
Performance testing and evaluation are conducted for the below mentioned scenarios.
• IMS HSS
– Erlang Diameter library - Diameter Cx, Sh applications
– End-to-end via Diameter over TCP
– End-to-end via RPC
• GSM HLR database API
CPU utilization is observed by running the top command. The measurements are in percentage and the values are
for the 4 core machines (please refer to hardware specifications in the table 3.2).
Memory utilization is measured by the use of the top tool and is the percentage of system memory used by the
tested application at given host.
Operations/sec is the desired (expected) number of operations per second configured for each of the Basho-bench
tests (number_of _concurrent_workers × rate).
Scheduler utilization is measured by Observer and shows wall time per scheduler.[25, 22]. Utilization is measured
by percentage and number of schedulers in use. Erlang uses one scheduler per physical core.
4.4.1 Diameter
Diameter tests with results as tabulated in table 4.2 were run between the I-CSCF client , S-CSCF client over Cx
interface and HSS, AS over Sh interface and HSS. TCP was used as the transport protocol to send the diameter
application messages between the Diameter clients and Diameter server.
Diameter client (I-CSCF or S-CSCF or AS) as depicted in the figure 4.1 uses the Identity Server to obtain the required
identities (IMPU or/and IMPI) and the FE HSS serves as the Diameter server. The Basho-bench client runs both the
Identity Server and the Diameter client requests. The replies to each of the Diameter message are returned by the
stubbed Diameter replies by the FE HSS. This results in performance testing of the Erlang Diameter library provided
as part of the R15B release. Diameter Cx procedures UAR, LIR, MAR, SAR and Sh procedures UDR, SNR and PUR
performance results will be analyzed in the Section 4.6.1.
44
FE HSS
Memory Scheduler
Interface Operations Throughput Latency CPU
utilization utilization
/ Procedure /sec (ops/sec) (ms) utilization
(%) % (cores)
(%)
Cx/UAR 500 500 1 65 1 10-12 (1 core)
1000 910 5 96.5 1 18-20 (1 core)
2000 1000 95 100 1 25-30 (1 core)
3000 1000 195 99.5 1 20-25 (1 core)
Diameter over SCTP performance is tabulated as shown in the table 4.3. Same test-setup as used for running diameter
over TCP was used to run Diameter over SCTP. Diameter over SCTP performance results are analyzed in the Section
4.6.1.
45
FE HSS
Memory Scheduler
Interface Operations Throughput Latency CPU
utilization utilization
/ Procedure /sec (ops/sec) (ms) utilization
(%) % (cores)
(%)
Cx/UAR 500 490 2 54 1 10-12 (1 core)
1000 810 15 85 1 15-20 (1 core)
2000 810 130 82 1 15-20 (1 core)
3000 810 260 82 1 15-20 (1 core)
End-to-end diameter results are formulated in the table 4.4. End-to-end Diameter performance test involves the
Basho-bench clients (I-CSCF, S-CSCF and AS) as Diameter clients which make Diameter calls to the Diameter server
FE HSS over TCP transport. FE HSS serves the Diameter requests by invoking the required call-backs which results
in the execution of the corresponding Cx/Sh procedure call. FE HSS machine (please refer to the topology figure
4.1) hosts the procedure workers, operator, maintenance functionality, HSS database API(both eLDAP components
and Mnesia operation handling) as described in the IMS system architecture (please refer to the IMS HSS system
architecture figure 3.5).
FE memory utilization and FE CPU utilization is due to the Cx/Sh procedure execution, HSS database API handling
(eLDAP workers, managers and mnesia in memory database) and Erlsom for transforming Erlang records into required
XML strings as specified by the schema. Scheduler utilization is as observed by the observer tool for the FE HSS
Erlang node.
BE CPU utilization is due to the slapd serving the LDAP requests.
Performance results for end-to-end diameter results are analyzed in the Section 4.6.2.
46
Mean FE Memory FE CPU BE CPU Scheduler
Ops Throughput
Procedure Latency utilization utilization utilization utilization
/sec (ops/sec)
(ms) (MB) (%) (%) % (cores)
Cx/UAR 500 325 52 665 185 10 20-25 (2 cores)
1000 325 210 652 185 10 20-25 (2 cores)
2000 325 510 635 183 10 20-25 (2 cores)
End-to-end RPC performance is tabulated below. RPC tests are performed to by-pass the diameter stack.
RPC calls are made by the Diameter clients such as I-CSCF, S-CSCF and AS to the Cx and Sh procedures hosted
by the FE HSS. Diameter protocol is not used by the Diameter clients to communicate with FE HSS instead the
RPC calls result in direct invocation of the corresponding procedures. Static data is served by the BE LDAP and the
dynamic data is served by the Mnesia.
FE memory utilization and FE CPU utilization is due to the procedure code execution, HSS database API and Mnesia
operations performed. Scheduler utilization is as observed by the observer tool for FE HSS Erlang node.
47
Mean FE Memory FE CPU BE CPU Scheduler
Ops Throughput
Procedure Latency utilization utilization utilization utilization
/sec (ops/sec)
(ms) (MB) (%) (%) % (cores)
Cx/UAR 500 480 2.5 700 220 15 15-20 (4 cores)
1000 880 3 687 340 30 35-40 (4 cores)
2000 1821 5 675 390 59 85-90 (4 cores)
The results show that throughput of more than 1400 ops/sec with less than 1 milli-second latency for the HLR database
API for 1600 ops/sec. Higher memory usage observed for the check_bs_provisioned API as compared to the other
two API calls tabulated is due to larger GSM profile results.
48
4.6 Performance analysis
The analysis of the performance results (please refer section 4.4 for measurements information) for Erlang Diameter
library, End-to-end Diameter performance, End-to-end RPC performance in the IMS domain and the GSM HLR
database API component are presented in this section.
Performance analysis of the Diameter Cx and Sh applications are presented in the Section 4.6.1. This section provides
performance analysis of Erlang Diameter Cx and Sh applications tested over TCP and SCTP as transports. These
performance tests are conducted with stub Diameter Cx and Sh procedure request/response messages to evaluate the
performance of Diameter protocol stack in isolation.
Section 4.6.2 provides performance analysis of the end-to-end Diameter tests results of the Section 4.4.2.
End-to-end RPC performance analysis of the results in the Section 4.4.3 is done in the Section 4.6.3.
4.6.1 Diameter
The results from the table 4.2 can be visualized in the figures 4.2 and 4.3
Observation in the figure 4.2 and 4.3 for TCP as transport protocol shows that for any given diameter Cx /Sh procedure
call on the FE HSS machine results in
• Throughput throttling when more than 1000 operations/sec are requested. This observation provides an hint
that the single diameter_watchdog process which handles every diameter incoming message as the bottle-neck
process. Pin-pointing the bottle-neck process in the diameter stack however needs more investigation.
49
• Latency increases due to the inefficient incoming message handling by the diameter_watchdog process at more
than 1000 operations/sec. This results in Diameter stack virtually unusable even in moderate loads of more than
1000 operations/sec.
• CPU utilization increases when there is an increase of number of operations from 500 to 1000. Throughput
increase also reflects in the increase of CPU utilization from 500 to 1000. After 1000 operations/sec there is no
increase in CPU utilization as the bottle-neck is in handling of incoming diameter messages.
• Memory utilization is not high in the FE HSS Erlang node as there is no state stored for any of the procedures
and stub diameter messages replied over the Diameter Cx/Sh interface. No database API‘s are used since stub
diameter messages are returned as the aim is to conduct performance test of the diameter protocol stack.
• Scheduler utilization is low and one of the four scheduler threads are utilized in low percentages.
Diameter SCTP performance results can be observed in the table 4.3. The same performance results can be visualized
in the figure 4.4 and 4.5 for Diameter Cx and Diameter Sh procedures respectively.
Socket options for SCTP had to be tweaked to get better SCTP performance. In the diameter_sctp module, following
options were modified
• {active, once} caused performance problems , when the {active, once} (to receive one SCTP packet at a
time and this option requires re-setting the option every time a packet is received) was changed to {active,
true} to actively receive packets which are received at the port. More investigation into {active, once} as
SCTP socket option causing problems should be done while TCP does not have performance problems with
respect to {active, once} as socket option.
• {recbuf, integer() > 0} is by default 1500 bytes, receiving default window size was not enough to sustain
higher number of operations/sec. When the option was tweaked to {recbuf, 65536} was able to provide the
required receiver kernel socket buffer size for SCTP.
50
• sctp_nodelay was set to true , this option results in low throughput but not at the cost of increased latency.
The default setting was false which caused the client queries to time-out in order to aggregate more data chunks
into a single packet (to get more throughput). More information about the sctp_nodelay option can be found
here [23].
As observed from the tables 4.2 and 4.3, the latencies when SCTP is used as transport are slightly higher and
throughput is slightly lower with SCTP socket options tweaked as mentioned above. Lower performance of SCTP as
transport layer for the same diameter messages can be attributed due to the overhead incurred by SCTP in framing
messages. Further performance analysis of SCTP as transport needs to be done to draw concrete conclusions.
The performance analysis of the diameter stack over TCP and SCTP as transport indicates a bottle-neck in the
diameter stack which needs investigation and performance enhancement if the HSS were to handle moderate and high
load over 1000 operations/sec.
Advantages
• Provides utilities to for encoding and decoding of AVP. diameterc utility is helpful for transforming the dictionary
files into Erlang source code [20].
• Has support for SCTP and TCP transport protocols.
• Developing RFC complaint and specification complaint Diameter applications is made easy as pretty neat inter-
faces to the peer modules, handling of connections and services are provided.
Drawbacks
• As discussed in this section, Erlang Diameter version 1.1 library released as part of R15B has issues with respect
to handling high number of concurrent requests (more than 1000 operations/sec).
• Few issues were observed when using the add_transport API [21]. When the SCTP transport protocol was not
configured as part of Erlang installation, the add_transport API returned {ok, <reference>} successfully.
This error scenario can be better handled with standard {error, eprotonosupport} message.
51
Figure 4.7: End-to-end Diameter Sh over TCP performance analysis
The table 4.4 results in the following inference and the same can be visualized in the graphs 4.6 and 4.7.
• Throughput remains in no-increase pattern as the the number of operations per sec increases. This is due to the
Erlang Diameter stack performance issues as indicated in the Section 4.6.1. Diameter protocol is the bottle-neck
when end-to-end performance tests using Diameter are conducted. High CPU intensive Diameter calls such as
SAR, MAR (have more processing and hence introduce more delay) have low throughput when compared to the
other light-weight procedures such as LIR which neither have Erlsom operations nor the authentication vector
generation operation.
• Mean latency increase is observed mainly due to throttling in the diameter stack as the number of concurrent
worker operations/sec increase. As seen latency is high for CPU intensive operations (SAR, MAR in relative
with LIR. Similarly CPU intensive operations such as SNR, UDR and PUR have similar mean latency.
• Memory utilization is high for the procedures such as SAR as they need more than one dynamic data records,
more than two BE LDAP calls and Erlsom operations to write a Diameter Cx profile XML string. This is
evident by observing SAR operation at 500 operations/sec and PUR at 500 operations/sec (which has no Erlsom
operations and have few BE LDAP calls). UAR, LIR even with no Erlsom operations have dynamic records to
be read and initialized in some cases, have high memory utilization and few BE LDAP calls.
• FE CPU utilization and Scheduler utilization cannot be analyzed further as the bottle-neck in diameter does
not allow high number of concurrent diameter requests to be made and processed. Scheduler utilization though
shows an increase in the number of cores used by one when compared to diameter performance test alone due
to other CPU operations and the other scheduler thread is busy.
• BE CPU utilization is not high as there are no high concurrent requests made due to the bottle-neck in diameter
stack.
The table 4.5 provides the following inference and can be seen in the graphs 4.8 and 4.9.
52
Figure 4.9: End-to-end RPC Diameter Sh performance analysis
• Throughput increases linearly for procedures such as Diameter Cx/UAR, Diameter Cx/LIR as these procedures
have low CPU demands, reason being no XML string generation required in order to process these queries by
the HSS.
Sh/PUR, Sh/UDR and Sh/SNR have low Erlsom requirements and have high throughput as the number of
operations/sec requirement grows.
As discussed before in the Section 2.7.2 Erlsom uses considerable amount of CPU as the number of operations/sec
requirement grows for XML string generation. Procedures such as Cx/SAR have high requirements of Erlsom
as they need a complete Cx user profile to be parsed into the XML adhering to the schema specified [11].
This results in high CPU usage and hence these procedures when placed with high requirement of number of
operations/sec are bottle-necked by the CPU available.
In case of MAR procedure the high CPU utilization is due to authentication vectors generated. MAR is throttled
for CPU as shown in the table, the throughput does not increase after requests of more than 1000 MAR
operations/sec are requested.
• Mean latency as observed for procedures with high CPU utilization when bottle-necked for CPU results in
higher latencies , for example Diameter Cx SAR. High CPU utilization in case of MAR is due to quintuplet
authentication vector generation every time a Diameter MAR request is made as mandated by the specification
[16]. Procedures which are not throttled due to CPU constraints don’t have high latencies.
• FE memory utilization remains high for procedures which initialize the records user_registration_info,
service_registration_info, repository and use them in procedure execution.
The increase in memory utilization initially can be seen for PUR request as it initialize more repository records
with increase in high number of operations /sec.
The procedure SNR has to read subscription_notification_info and retrieve data from repository which
explains high memory usage with steady increase in the number of SNR operations/sec.
• FE CPU utilization increases as explained before, for Erlsom and authentication vector operations. These CPU
intensive operations at high number of operations/sec request result in throttling and hence almost utilizing the
CPU entirely as in case of SAR, MAR even for 1000 operations/sec request.
• BE CPU utilization increases when there is requirement for more number of LDAP requests per procedure
execution. This is seen in case of SAR at 1000 operations/sec. UAR , UDR procedures which is not constrained
by CPU places steady increase of load on the LDAP BE with increase in number of operations/sec.
• Scheduler utilization increases with increase in the number of operations/sec. All the scheduler threads are
utilized to the maximum in case of the SAR procedure even at 1000 operation/sec and in cases of SNR, UDR
at 2000 operations/sec as these procedures are less CPU intensive.
4.7 Capacity
The section covers the capacity of the HLR/HSS in terms of RAM requirements in order to the serve the Diameter
Cx LIR.
To serve dynamic data for procedures, Mnesia in-memory database was used. Mnesia in-memory database served the
procedural data required for both Diameter Cx, Sh interfaces and MAP protocols.
The following records were mainly used for Diameter Cx and Sh procedures:
53
• Each entry in user_registration_info table requires 3040 bytes. To serve a single public identity 3040 bytes
are needed which can be used by the Cx and Sh procedures. To serve 80000 users 232 MB of memory.
• Each entry in repository table requires 1450 bytes of memory. To serve a single public identity which has single
repository data item which can be subscribed(SNR), read(UDR) and updated (PUR). With this assumption to
serve Sh procedures with repository data for 80000 users 110.7 MB memory.
• Each entry in sh_subscription_notify_info table requires 2896 bytes. To serve a single public identity which
needs to subscribe to the repository data requires 2896 bytes. For serving 80000 users which subscribe to single
repository data item 221 megabyte (MB) memory.
• operator_specific_data requires 76 kB of memory.
The data for each entry in the respective mnesia tables were obtained by running the end-to-end RPC tests for 80000
distinct identities. Please refer to the Section 4.4.3 for more information on end-to-end RPC tests.
The total amount of RAM needed includes Mnesia table space, memory to run the Cx/ Sh procedures, HSS database
API (eldap workers) and Erlsom parsing memory needs.
As seen in the table 4.5 memory requirements for LIR procedure requires nearly 700 MB of memory for 80000 distinct
identities. The FE memory utilization as provided by the observer tool includes Virtual Machine (VM) memory
usage, procedural memory, eLDAP manager/worker processes and Mnesia in-memory database.
Discussion above about the memory requirements about Mnesia table user_registration_info is 232 MB for 80000
users. Number of eLDAP workers run were 640 eLDAP worker processes (16 eLDAP managers * 40 workers managed
by each eLDAP manager). Memory requirement for running 640 eLDAP workers which would be sufficient to serve
the LIR 2000 operations/sec is 262 MB. More information about the memory requirement of the eLDAP can be found
in the concurrent thesis report [28].
The procedure execution at the rate of 2900 operations/sec along with Erlang VM) requires 206 MB ((700MB - 262MB
(eldap_worker_memory) - 232MB (user_registration_info mnesia table)).
As observed in the Section 4.2, 8 distinct identity associations per subscriber is the test data. 80000 distinct identities
served here correspond to 10000 IMS subscribers. To server 10000 subscribers, at the rate of 2900 LIR operations/sec
with given identity configuration mentioned, FE needs 700 MB of RAM.
4.8 Scalability
As discussed in the Section 4.7 a FE IMS HSS serving LIR can be depicted as a block shown below. LIR is chosen
procedure since the number of LDAP BE query is a trivial one to one mapping.
A LIR operation with a public user identity request would require one eLDAP query (check_public_user_identity_exists
per procedure execution. (refer to hss_db_api to eLDAP query mapping for each of the Cx and Sh procedures in the
table 3.3).
The BE LDAP throughput, memory and capacity aspects as shown in the figure 4.11 are covered in detail as part of
the concurrent thesis work [28].
54
With FE block and BE block as depicted above, a single BE can serve 11 FE blocks as shown in the figure 4.12.
The BE can provide 33590 ops/sec for 50000 subscribers with the same throughput performance for the BE block
shown in the figure 4.11.
Each FE block as shown in the figure 4.10 has RAM memory enough to support the 50000 distinct IMS subscribers.
To fully utilize the BE throughput of 33590 ops/sec 11 FE blocks (each with 2900 ops/sec) can serve 50000 IMS
subscribers.
With given hardware configurations of FE and BE system (without replication in fully-cached mode) can serve 50000
IMS subscribers.
To serve 10000 IMS subscribers, as discussed in the Section 4.7, 232 MB of memory is needed for storing the
user_registration_info Mnesia table, for 50000 IMS subscribers 1160 MB of memory for Mnesia table is needed
and the 640 eLDAP workers would be sufficient while the procedure memory would not increase as the FE HSS is
bound by high CPU utilization (please refer to the table 4.5 for observing end-to-end RPC performance). Therefore
the memory requirements to serve 50000 IMS subscribers LIR requests at the rate of 2900 ops/sec would be sum
of 1160 MB (Mnesia table user_registration_info) 206MB of procedure worker memory and 262 MB memory
requirement for eLDAP, resulting in a total of near 1628 MB.
55
Figure 4.13: Load balancing:subscription location analyzer
The subscription location analyzer acts as primary interface to the I-CSCF, S-CSCF and AS over Diameter Cx and
Diameter Sh interfaces respectively. Any diameter request originating from these components would be first consumed
by the subscription location analyzer, based on the domain name component of the request originating, the FE HSS
node would be identified. This requires analyzing the Diameter requests, which means application layer packet analysis
to re-direct the request to the appropriate FE HSS node.
The advantages of the using subscription location mechanism to load balance the available FE HSS would be based on
the traffic analysis, redundant nodes to serve a particular domain can be added. The number of available unique nodes
will depend on the number of domains (location) supported by the given HSS. The number of redundant nodes for a
given FE HSS node would depend on the traffic and the capabilities of the FE HSS node. With load-balancing shown
above, with a single node as stand-by for each of the given FE HSS node, a total of 2×N nodes would be required for
N FE HSS nodes for minimum fault tolerance.
The de-merits of this approach would be a subscription location analyzer, which would require high CPU utilization as
the Diameter messages need to be analyzed at the application layer to obtain the domain information and subsequent
routing of the diameter packet to the respective FE HSS node. Though redundant nodes for subscription analyzer
minimizes CPU utilization on given node, this would not be low-cost solution.
One another mechanism is IP based load balancing, where the packet can be re-directed based on the IP sub-net. This
is one of the common methods used to load balance.
56
Chapter 5
Conclusion
This chapter concludes by providing summary of the thesis work done and future enhancements identified in-order to
make prototype a deploy-able product.
Section 5.1 summarizes the features developed in-order to meet the objectives of the thesis work.
Issues identified in components, testing scenarios, third-party tools and the prototype are identified as future enhance-
ments. Nice-to-have features in the third-party tools which would enhance usability or performance of the tools have
been identified and noted in the Section 5.2.
5.1 Summary
Following objectives of the thesis were met:
• Suggest improvements for components, third-party tools used and the prototype.
In meeting the objectives of the thesis, the prototype designed and developed serves as proof-of-concept for the following
features
• Specification compliance
The developed IMS HSS prototype provides implementation of the procedures of Diameter Cx interface namely
the UAR, LIR, SAR and MAR. With the implementation of these procedures, location management, user-data
management and authentication can be handled by the IMS HSS. The I-CSCF can make location related queries,
S-CSCF can perform user-data management related queries, authentication queries pertaining to the subscriber,
it is currently responsible.
Diameter Sh procedures UDR, PUR, SNR and PNR are implemented. This allows the AS to perform user-
data related queries such as user-data read, updating user-data, subscribing to the user-data updates, receive
if any notifications on the subscriptions to the updated user-data. Specification compliance is the basic step
which ensures operator develop and build on the prototype in-order to transform it into a deploy-able product.
Specification compliance provides all the necessary benefits of adhering to The 3rd Generation Partnership
Project (3GPP).
• Integrated subscription model.
The necessity to avoid duplication of subscriber data is prime importance if the operator has to grow his
subscriber numbers and provide large number of services accessible effectively via different technologies. In this
thesis work, IMS and GSM subscribers were considered, hence the duplication of subscriber data had to be
looked into the HSS and HLR. A consolidated LDAP DIT for both GSM and IMS subscribers was designed
which can be extended for other telecommunication technologies such as General Packet Radio Services (GPRS).
Consolidated LDAP DIT was the basis of the LDAP schema design for the concurrent thesis work. LDAP DIT
designed provides an insight into how subscriber data duplication can be avoided.
58
Integration of the FE IMS HSS server with the BE LDAP realized the static subscriber data access for the IMS
HSS clients. GSM HLR database API have been provided which used the common BE for static subscriber data
and dynamic data (procedural data) required for both GSM and IMS was served using the Mnesia database.
• Classification of data
Data classification lead to clear division of subscriber data (maintained by the LDAP BE) and procedure data
(maintained by the Mnesia in-memory database). As result LDAP which is highly-proficient with read intensive
requests was confirmed as the database access protocol to be investigated. (please refer to LDAP efficiency in the
concurrent thesis report [28]). Mnesia as in-memory distributed database was used to handle the dynamic data
classified. The dynamic data was partitioned into Erlang records, which were stored as Mnesia table entries.
• Performance analysis
FE performance has been analyzed and bottle-neck components in the third-party components such as Erlang
Diameter library, Erlsom and Basho-bench has been highlighted.
– Erlang Diameter stack performance analysis done was crucial. This highlighted the bottle-neck in perfor-
mance caused. If the prototype has to be developed as deploy-able large-scale product, Diameter message
processing at the rate of 1000 operations/sec is clearly not sufficient. An hint to bottle-neck component of
the Erlang Diameter stack has been provided, which requires further investigation.
– Erlsom usage as XML string generating tool was noted. CPU utilization issues when the concurrent requests
are higher than 2000 operations/sec was identified. An highly-efficient XML generating tool is very much
necessary in-order to provide specification complaint implementation of the procedures. The schema for
XML format of user-data has been specified by the 3GPP.
– Basho-bench as test-tool was investigated. By conducting performance analysis of the Basho-bench with
null driver, this revealed the discrepancies in the results. Yield inconsistency of the Basho-bench needs to
be investigated.
– Performance analysis along with evaluation of real-time characteristics included discussion about capacity
requirements to serve 10000 IMS subscribers. This was realized by conducting performance evaluation of
the prototype for 10000 IMS subscribers.
– Scalability discussion for 50000 IMS subscribers was discussed and evaluated (please refer here for scalability
discussion, Section 4.8). Scalability discussion was based on the capacity requirements to serve 10000 IMS
subscribers by the FE HSS and the BE LDAP performance results.
– Load-balancing features for the prototype can be referred in the Section 4.9, which is one of the primary
requirements when the HLR / HSS product would be deployed to serve in large scale. Subscription location
analyzer and the more common IP layer load-balancing mechanisms were discussed.
Discussions about capacity, scalability and load-balancing features based on the performance analysis of the
prototype provide an insight into realization of the product which can be deployed in the large-scale environment.
• Testing
Basho-bench as test tool served the purpose of conducting performance tests, stress testing. The test-tool as
framework allowed testing each of the components in isolation, end-to-end scenarios were analyzed. Basho-bench
test-drivers were written for testing each of the components, third-party tools and end-to-end scenarios.
• Erlang Diameter
– Diameter stack needs performance improvement with respect to handling of incoming diameter messages.
diameter_watch_dog process needs to be modified in-order to handle highly concurrent incoming diameter
messages. This is of prime concern if the IMS HSS has to handle more than 1000 operations/sec which is
very basic for deployment of the HSS.
– Issues with Diameter SCTP socket options needs to be looked into (please refer Section 4.6.1 for SCTP socket
issues). SCTP as transport for Diameter messages (Erlang Diameter library) is an important feature of the
Erlang Diameter stack, as SCTP would be preferred transport protocol in telecommunication applications.
59
– add_transport API needs to convey the correct user message in case the underlying transport requested is
not supported [21]. This would help Diameter application developers considerably in debugging transport
layer related issues.
• Subscriber data generation
Generated subscriber data has been configured for worst case scenarios for both storage and from procedure logic
perspective. Different configuration of subscriber data with respect to identity association needs to be done.
• Integration - Tieto Signaling System 7 (SS7) stack
GSM HLR database API has not been integrated to the HLRprocedure logic and consequently to the MAP
interface of the tieto SS7 stack. This was not done due to time constraints of the thesis period.
• More performance testing
Scaling and load-balancing aspects as discussed in the Section 4.8 and Section 4.9 respectively have been proposal
observed based on single FE HSS node performance.
In-order to deploy the product, features such as scalability, resilience and load-balancing have to be tested by
conducting horizontal and vertical scaling of resources. Proposed Subscription location analyzer functionality for
load-balancing has to be developed and performance tests for the subscription location analyzer module needs
to be conducted. Performance due to scaling of resources, testing resilience of the system and load-balancing are
vital in-order to transform prototype into a deploy-able product.
• Concurrent mixed procedure testing
Concurrent mixed ratio of procedure requests from a single HSS client such as I-CSCF or an AS has been done.
However, testing of the HSS with mixed ratios of the Diameter Cx, Sh procedures from different clients such
as AS and CSCF elements simultaneously was not conducted. As this testing scenario required more number
of IMS HSS clients, in-order to issue concurrent requests to the IMS HSS over the Diameter Cx and Diameter
Sh interface simultaneously. This is typical of a real-world deployment. Performance of the HSS in this typical
real-world scenario needs to be conducted and analyzed.
• Automated testing
Automation script development for testing of the prototype could not be done due to time constraints. Con-
figuring the test environment, subscriber generation based on required scenarios and stress testing for a given
critical resource would all be nice to have features and would test the system effectively.
• Third-party tools
– Basho-bench
∗ Yield / throughput inaccuracies need to be rectified, this would result in more accurate test results.
∗ Better interface to pass Erlang VM parameters so that VM parameters required can be easily configured
for testing would be nice to have feature.
∗ Reduce memory requirements per worker and develop features to obtain statistics about CPU utiliza-
tion, Input Output (IO) usage.
These enhancements would make Basho-bench a better performance, stress testing tool.
– Erlsom
Erlsom provides XML string generation via Data Binder mode, which is validated against a given XML
schema. As observed before with Erlsom performance tests, any measure to reduce CPU utilization would
benefit the performance of user-data management procedures of Diameter Cx and Sh interface. Erlsom
XML string generation performance would enhance the performance of the prototype.
60
Appendix A
Sequence Diagrams
62
Figure A.2: UAR/UAA sequence diagram.
63
Figure A.3: SAR/SAA sequence diagram.
64
Figure A.4: MAR/MAA sequence diagram.
65
Figure A.5: RTR/RTA sequence diagram.
66
A.2 Diameter Sh procedure sequence diagrams
67
Figure A.8: UDR/UDA sequence diagram.
68
Figure A.9: SNR/SNA sequence diagram.
69
Figure A.10: PNR/PNA sequence diagram.
70
Appendix B
{ operations , [ { lir , 1 } ] } .
Example for running Basho-bench for LIR procedure with 50 concurrent workers at the rate of 10 operations/sec.
Setting the key_generator value to { uniform_int , 80000 } results in picking of the key-value in uniform
distribution manner from 1 to 80000 , which is used by the Mnesia Subscriber Server (MSS) to return the
public-identity for LIR procedure.
Required procedure to be run is LIR which can be set as value of the property operations in the config file.
• The corresponding driver file is hss_cx_driver.erl is as listed below
- module ( hss_cx_driver ) .
- export ( [ new /1 , run /4 ] ) .
- include ( " basho_bench . hrl " ) .
72
? INFO ( " ~ p net kernel started as ~ p ~ n " , [ self () , node () ] )
;
{ error , { already_started , _ } } ->
ok ;
{ error , Reason } ->
? FAIL_MSG ( " failed to start net_kernel for ~ p : ~ p ~ n " , [ ?
MODULE , Reason ] )
end ,
inet_db : set_lookup ( [ dns ] ) ,
inet_db : add_ns ( { 192 ,168 ,211 ,10 } ) ,
HSS = ba sh o_ be nc h_ co nf ig : get ( hss ) ,
MSS = ba sh o_ be nc h_ co nf ig : get ( mss ) ,
? INFO ( " ~ p connect ~ p ? ~ p ~ n " , [ self () , HSS , net_kernel : connect (
HSS ) ] ) ,
? INFO ( " ~ p connect ~ p ? ~ p ~ n " , [ self () , MSS , net_kernel : connect (
MSS ) ] ) ,
{ ok , # state { hss = HSS , mss = MSS } } .
• To run the Basho bench driver corresponding the configuration listed above B.1, in the Basho -bench installed
directory.
./ basho_bench config / rpc_hss_cx . config
73
Appendix C
Erlang configuration
Erlang/OTP R15B01 was compiled from source using the following options.
-- enable - smp - support -- enable - threads - enable - native - libs -- enable - sctp
74
Bibliography
76
[21] Ericsson AB. diameterc. http://www.erlang.org/doc/man/diameter.html#add_transport-2.
[22] Ericsson AB. Erlang scheduler wall time. http://www.erlang.org/doc/man/erlang.html#system_flag_
scheduler_wall_time.
[23] Ericsson AB. gen_sctp. http://www.erlang.org/doc/man/gen_sctp.html.
[27] Fraunhofer Fokus, OSIMS. OSIMS - The FOKUS Open Source IMS Core. http://www.fokus.fraunhofer.de/
en/fokus_testbeds/open_ims_playground/components/osims/index.html, 07 2012.
[28] Erik Grafström. Resilient and optimized ldap database implementation for a large scale hlr / hss. Master‘s
thesis, Department of Information Technology, Uppsala University, Mobile Arts, Stockholm, 02 2012. This work
is referred to as concurrent thesis work in the report.
[29] Miikka Poikselkä, Georg Mayer. The IMS: IP Multimedia Concepts and Services, 3rd Edition. Wiley, 2009.
[30] Nokia Siemens Networks. Subscriber Data Management, Strategic data consolidation. Nokia Siemens Networks,
2008.
[31] Open IMS, Fraunhofer Institute. Source code downloadr. http://www.openimscore.org/download, 07 2012.
[32] OpenLDAP Foundation. OpenLDAP Software 2.4 Administrator’s Guide. Overlays. http://www.openldap.org/
doc/admin24/overlays.html.
[33] P. Calhoun and J. Loughney and E. Guttman and G. Zorn and J. Arkko. Diameter Base Protocol. http:
//tools.ietf.org/html/rfc3588, 2003.
[34] R. Stewart, Q. Xie, K. Morneault, C. Sharp, H. Schwarzbauer, T. Taylor, I. Rytina, M. Kalla, L. Zhang, V.
Paxson . Stream Control Transmission Protocol. http://www.ietf.org/rfc/rfc2960.txt, 2000.
[35] Michael Stonebraker. The case for Shared Nothing. Database Engineering, 9:4–9, 1986.
[36] Torbjörn Törnkvist. ELDAP Github repository. https://github.com/etnt/eldap.
77