Adaptive Quality of Service of Voice over IP Communications Nelson Costa Instituto Superior Técnico (IST) Lisbon, Portugal eng.ncosta@gmail.com Authors Mário Serafim Nunes Lisbon, Portugal mario.nunes@inesc-id.pt - April 2009
Overview Motivation Objectives QoS Proposed Solution QOS Architecture Voice Quality Measurements FEC Evaluation with computer simulations Conclusions 2
Motivation IP Protocol Designed for Best-effort Service, no QoS All services get the same level of priority Voice and Video Services Minimum quality of service required Stringent delay requirements Specially interactive traffic Current solutions for QoS over IP IntServ; DiffServ; MPLS However, public Internet is still Best-effort 3
Objectives Study the communication process of voice over IP networks Identification of key points that influence the quality of voice Define an innovative strategy to improve the quality of service in voice communications over best effort Internet, affected by losses and delay of voice packets in the network. Develop a prototype application to implement the quality of service strategy proposed and prove its feasibility. 4
QoS Proposed Solution Independent of the IP network Without costs of changes in the core and access IP network (routers) Compatible with available VoIP implementations Use of standard protocols Comprises three QoS operations: 1º Switching the voice codec in real time in a conversation 2º Switching the transport protocol also in real time in a conversation 3º Turning On/Off a FEC mechanism 5
Switching of Voice Codec What is the best voice codec for a VoIP communication? There is not a good answer to this question, due to the variable congestion of the IP network. Tradeoff between the available bandwidth, delay and losses. complex and We intend to automate the process to find out the more appropriate codec to use in a specific network condition. Algorithm rules for choosing the most suitable voice codec: There is a Codec switch when the voice quality does not correspond to the minimum requirements Switching process is based on the list of available Codecs, ordered by their transmission rate / quality 6
Switching of Transport Protocol What is the best transport protocol for a given situation? Tradeoff between delay and packet losses UDP Low delay, the sacrificed factor is the packet losses TCP Low losses, the sacrificed factor is the delay Difficult balance: voice traffic is highly sensitive to delay and packet losses We intend to automate the process of choice of the transport protocol to use in a specific network condition. Algorithm for choosing the most suitable transport protocol UDP is the default transport protocol. Permanent monitoring of delay and packet loss during a VoIP call. Detect unacceptable values and act to increase the voice quality: When using UDP and packet loss ratio > 2%, change transport protocol to TCP When using TCP and delay > 200 ms, change transport protocol to UDP 7
FEC Mechanism Intends to reduce the voice packet losses in a channel with high error rate. Based on the transmission of redundant information. Solves the problem of lost packets related with the physical conditions of the medium or congestions in the network High error rate typically occur in wireless networks. Key issues Choose the most appropriate FEC mechanism Necessary to define the FEC block size (impact on delay) 8
Algorithm of QoS Proposal 9
Example of Codec Switching G.711 64 Kbps G.729A 8 Kbps B A R=90 C R=80 R=90 B- Congestion 10
Example of Transport Protocol Switching B- High error rate B A C 11
Architecture of the QOS Application Components: GuiManager Implements the graphical user interface SipManager Implements and manages the SIP state machine MediaManager - Generates and receives RTP and RTCP packets EvalQoS Calculate the R factor of the E-Model DoQoS Evaluates and decides the QoS operation to be performed 12
Voice Quality Measurements - Bandwidth Limitation 100 Test Scenario 2 90 80 70 60 0 200 400 600 800 1000 1200 1400 1600 1800 Time (s) Codec change Codec NetLimiter Mean Mean Packet Mean Delay Loss Rate G.711-72 0.00 91.7 G.711 60 Kbps 125 0.47 88.7 DVI4-71 0.00 89.2 DVI4 40 Kbps 122 0.23 87.1 increase 13
Voice Quality Measurements - Network Congestion (1) Reference scenario, no load. 100 Test Scenario 1 80 60 40 20 0 0 100 200 300 400 500 600 700 Time (s) Load: 8 Mbps 95 Test Scenario 2 90 85 80 75 70 0 100 200 300 400 500 600 700 Time (s) Protocol Mean Mean Packet Mean Delay Loss Rate UDP 73 0.00 91.7 TCP 121 0.00 90.6 TCP: lower R Iperf Mean Mean Packet Mean Protocol Traffic Delay Loss Rate UDP 92 0.65 89.0 8 Mbps TCP 130 0.00 90.2 TCP: higher R 14
Voice Quality Measurements - Network Congestion (2) Load: 8.5 Mbps 95 90 85 80 75 70 Test Scenario 3 0 100 200 300 400 500 600 700 Time (s) Iperf Mean Mean Packet Mean Protocol Traffic Delay Loss Rate UDP 115 1.62 84.9 8.5 Mbps TCP 138 0.00 89.8 TCP: higher R Load: 9.5 Mbps 100 80 60 40 20 0 Test Scenario 4 0 100 200 300 400 500 600 700 Time (s) Iperf Mean Mean Packet Mean Protocol Traffic Delay Loss Rate UDP 221 17.16 46.0 9.5 Mbps TCP 384 0.00 71.3 TCP: much higher R 15
FEC Evaluation in VoIP Environment Simulation TCP Traffic Generators Generate best-effort traffic VoIP Traffic Generator Generate VoIP packets, every 20 ms IP Network Represented by two routers with multiple queues TCP Traffic Destination Implements TCP reception and ACK VoIP Traffic Destination Receive VoIP packets Set of simulations performed with different configurations: Q3 queue size: 32, 16, 8 KBytes Number of TCP traffic generators: 1, 2, 4, 8, 10 TCP traffic generators rate: 128, 256, 512, 1024 Kbps 16
FEC Evaluation in VoIP Simulations (1) Q3 queue size = 16 KBytes Factor R 90 85 80 75 70 65 60 55 50 Mean 10 TCP sources with a 128 Kbit/s transmission rate 4 TCP sources with a 512 Kbit/s transmission rate 8 TCP sources with a 1024 Kbit/s transmission rate 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Block Size TCP Rate TCP Sources FEC Block Size Mean Mean 1 87.0 128 Kbps 10 2 87.1 84.3 3 85.0 1 87.1 512 Kbps 4 2 87.3 84.1 3 85.1 1 85.6 2 85.1 1024 Kbps 8 80.3 3 83.1 4 80.6 Main conclusion: The highest mean R factor occurs when we have a block size of 2 VoIP packets 17
FEC Evaluation in VoIP Simulations (2) Q3 queue size of 8 KBytes 95 90 85 80 75 70 65 60 55 50 Mean 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Main conclusion: Block Size 10 TCP sources with a 128 Kbit/s transmission rate 4 TCP sources with a 512 Kbit/s transmission rate 8 TCP sources with a 1024 Kbit/s transmission rate TCP Rate TCP Sources FEC Block Size Mean Mean 1 88.9 2 89.2 128 Kbps 10 85.6 3 88.9 4 88.5 1 88.5 2 88.6 512 Kbps 4 85.6 3 88.4 4 87.6 1 87.3 2 87.1 1024 Kbps 8 3 86.7 81.4 4 86.1 6 82.7 The highest mean R factor value occurs when the FEC block size is 2 or 3 packets 18
Conclusions Main benefits: Proposed QoS techniques work well in best effort IP networks Improve voice quality during a VoIP call Compatibility with existing VoIP applications Softphones: Eyebeam, SJphone, X-Lite;Hardphones: Snom 100, Cisco-CP7905 Measurements proved that the voice quality is improved when: Voice codec is switched when the available bandwidth is decreased (congested network) TCP is used for VoIP call in presence of high losses. FEC simulations proved that: FEC is only useful when the packets loss ratio > 1% The optimum FEC block size is 2-3 packets Further study: Tests with new FEC codes (RS, Raptor) More complex network scenarios should be tested. 19
Thank you