TCP BEHAVIOR OVER WIRELESS LINKS: POSSIBLE ... - ee.oulu.fi

2 downloads 272 Views 885KB Size Report
behavior of TCP by means of scheduling and network coding at the MAC layer. .... The emergence of new applications, such as social networks, video streaming ...
TCP BEHAVIOR OVER WIRELESS LINKS: POSSIBLE IMPROVEMENTS WITH SCHEDULING AND NETWORK CODING

by

Lakmal Madhusanka Liyanage

A research study report submitted in partial fulfillment of the requirements for the degree of Master of Science in Ubiquitous Networking and Computing

Examination Committee:

Nationality: Previous Degree:

Dr.Lucile Sassatelli Dr.Guillaume Urvoy-Keller Dr.Lopez Pacheco Dino Martin

Sri Lankan Bachelor of Science in Electronics and Telecommunication Engineering University of Moratuwa Sri Lanka

University of Nice Sophia Antipolis Sophia Antipolis France August 2011

ACKNOWLEDGMENTS First and foremost, I would like to express my sincere gratitude to my advisors Dr.Lucile Sassatelli and Dr.Guillaume Urvoy-Keller, researchers from I3S Laboratories, Sophia Antipolis, France for the continuous support for my internship at I3S Laboratories, for their patience, motivation, enthusiasm, and immense knowledge. Secondly, I am thanking Dr.Dino Lopez and Dr. Luc Deneire from Signet Group, I3S Laboratories, Sophia Antipolis, France for giving me an opportunity to work with them by providing a proper supervision and inspiration on me. Then, I am thanking Dr. Joanna Moulierac, Head of the Master in Ubiquitous Networking and Computing(UBINET) and all other professor in University of Nice Sophia Antipolis(UNSA) for their tremendous assistance for my studies in UNSA, France. Also, I am thanking my external advisor Dr. Poompat Saengudomlert, Associate Professor from Department of Telecommunication, Asian Institute of Technology(AIT), Thailand for the continuous support for my studies at AIT, and the other faculty members in the department of Telecommunication, Asian Institute of Technology for supporting me in various ways. Besides, I offer my regards and blessings to all of those who supported me in any respect during the completion of the research study.

ii

ABSTRACT The focus of this research study is on behavior of traditional TCP over wireless links and possible improvements with scheduling and network coding. TCP was originally designed for wired networks, where random bit error rate is negligible, and congestion is the main cause of packet loss. This assumption does not always hold when end to end path includes wireless links. Then, TCP assumes that higher packet losses and unusual delays in wireless links result from congestion in the network and performance of TCP is degraded. This research study was focused on the possible improvements and alterations which can be implemented in order to get rid of the above behavior of TCP by means of scheduling and network coding at the MAC layer. In first part of the research study, we investigate the impact of MAC layer retransmission on TCP Throughput Performance over Wireless LANs. In second section, we used the network coding approaches to identify the possible improvements for link delay at the MAC layer. Different scenarios have been considered and performances are checked by simulations. Then, the simulation results are verified analytically. The third part was dedicated to analyze the performance of the intra session and inter session coding schemes for the round robin scheduling policy. Key Words: Transmission control protocol , Wireless networks, Link delay, Network coding, Scheduling policies, Media access layer, Acknowledgments, Round robin, Shortest remaining processing time, Run2C

iii

Table of Contents Chapter

Title

Page

Title Page Acknowledgments Abstract Table of Contents List of Figures List of Tables List of Abbreviations List of Symbols 1

2

Introduction

1

1.1 1.2 1.3 1.4 1.5

1 2 2 2 3

Overview Statement of the Problem Objectives of the Study Scope and Limitations of the Study Structure of the Report

State of the Art 2.1 2.2 2.3 2.4

3

i ii iii iv vi viii ix x

4

Impact of Wireless Delay on TCP Modifications to TCP Network Coding and Coding Approaches Scheduling Approaches

Impact of MAC layer retransmissions on TCP Throughput Performance over Wireless LANs 3.1 Overview 3.2 Network Model 3.3 Wired Connection with Higher Delay Than Wireless Connection With 802.11b 3.4 Wired Connection With Similar Delay as Wireless Connection with 802.11b 3.5 Concluding Remarks

4

Delay Performance Gains from Network Coding without MAC Acknowledgments 4.1 4.2 4.3 4.4 4.5

5

4 6 9 11 13 13 13 14 15 15 20

Overview System Model Experiment with symmetric channel conditions Experiment with asymmetric channel conditions Experiment with symmetric channel conditions and progressive arrival of files

42

Delay Performance Gains from Network Coding with MAC Acknowledgments

48

5.1 Overview 5.2 Experiment with Symmetric Channel Conditions 5.3 Experiment with Asymmetric Channel Conditions iv

20 20 22 33

48 48 55

6

7

5.4 Experiment with Symmetric Channel Conditions and Progressive Arrival of Files

56

Performance Analysis of Inter-session Coding and Intra-session Coding on Round Robin Scheduling Policy

58

6.1 Symmetric Channel Condition Case without MAC Acknowledgments 6.2 Asymmetric Channel Condition Case without MAC Acknowledgments 6.3 Symmetric Channel Condition Case with MAC Layer Acknowledgments 6.4 Asymmetric Channel Condition with MAC Acknowledgments 6.5 Conclusion

63 65 66

Conclusions and Future Directions

67

7.1 Conclusions 7.2 Future directions

67 67

58 61

References

68

Appendix A: Difference Approach for Inter Session Coding

70

v

List of Figures Figure 2.1 2.2 3.1 3.2 3.3 3.4 3.5 3.6 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 5.1 5.2 5.3

Title

Page

The effect of a short disconnection in TCP transmission (Tian et al., 2005) The Butterfly Network The network model. Average TCP throughput vs drop rate: experiment 1 Average TCP throughput vs drop rate: experiment 2 Impact of value K Variation of the round trip time Variation of the round trip time System Model (Eryilmaz et al., 2006) Mean completion time of each file (Symmetric channels without MAC ACK) Mean completion time of the each file for Round Robin Scenario (Symmetric channels without MAC ACK) Mean completion time for SRPT scenario (Symmetric channels without MAC ACK) Mean completion time of the each file for RUN2C Scenario (Symmetric channels without MAC ACK) The probability distribution of the channel conditions Mean completion time of the each file (Asymmetric channels without MAC ACK) Behavior of corresponding convex functions at the smallest file size Mean completion time of the each file for Round Robin Scenario (Asymmetric channels without MAC ACK) Mean completion time of the each file for SRPT Scenario (Asymmetric channels without MAC ACK) Mean completion time of the each file for RUN2C Scenario (Asymmetric channels without MAC ACK) Mean completion time of the each file (Progressive arrival without MAC ACK) Mean completion time of the each file for Round Robin Scenario (Progressive arrival without MAC ACK) Mean completion time for SRPT scenario (Progressive arrival without MAC ACK) Mean completion time of the each file for RUN2C Scenario (Progressive arrival without MAC ACK) Mean completion time of the each file (Symmetric channels with MAC ACK) Mean completion time of the each file for Round Robin Scenario (Symmetric channels with MAC ACK) Mean completion time for SRPT scenario (Symmetric channels with MAC ACK)

vi

6 10 13 15 17 18 19 19 21 23 26 29 32 34 35 37 38 40 42 44 45 46 47 49 51 52

5.4 5.5 5.6 6.1 6.2 6.3 6.4 A.1 A.2 A.3 A.4

Mean completion time of the each file for RUN2C Scenario (Symmetric channels with MAC ACK) Mean completion time of the each file (Asymmetric channels with MAC ACK) Mean completion time of the each file (Progressive Arrivals with MAC ACK) Mean completion time for inter and intra session coding for symmetric channels without MAC ACK Mean completion time for inter and intra session coding for asymmetric channels without MAC ACK Mean completion time for inter and intra session coding for symmetric channels with MAC ACK Mean completion time for inter and intra session coding for asymmetric channels with MAC ACK Mean completion time for inter and intra session coding for symmetric channels without MAC ACK Mean completion time for inter and intra session coding for asymmetric channels without MAC ACK Mean completion time for inter and intra session coding for symmetric channels with MAC ACK Mean completion time for inter and intra session coding for symmetric channels with MAC ACK

vii

55 56 57 60 62 64 66 70 71 72 73

List of Tables Table 3.1 3.2

Title

Page

Simulation Setting of experiment 1 Simulation Setting of experiment 2

viii

14 16

List of Abbreviations ACK

Acknowledgment

BER

Bit Error Rate

BS

Base Station

BWE

Bandwidth Estimator

CDMA/CA

Carrier Sense Multiple Access with Collision Avoidance

CSI

Channel Side Information

CWND

Congestion Window

DCF

Distributed Coordination Function

DIFS

DCF Interframe Space

DUPACK

Duplicate Acknowledgment

ELN

Explicit Loss Notification

GF

Galois Field

IEEE

Institute of Electrical and Electronics Engineers

IP

Internet Protocol

LAN

Local Area Network

LCQ

Longest Connected Queue

LLR

Link Layer Retransmission

MAC

Media Access Control

MIMO

Multiple Input Multiple Output

MSS

Maximum Segment Size

NCL

Network coding Layer

OSI

Open System Interconnect

PDF

Probability Density Function

RR

Round Robin

RTO

Retransmission Time Out

RTT

Round Trip Time

RTTVRR

Round Trip Time Variation

SIFS

Short Interframe Space

SRPT

Shortest Remaining Processing Time

SRTT

Smooth Round Trip Time

TCP

Transmission Control Protocol

TCPW

TCP Westwood

WWW

World Wide Web

ix

List of Symbols α

Constant in RTO Estimation

β

Constant in RTO Estimation

γ

Length of a MAC ACK in time slots

β

Constant in RTO Estimation

K

Constant in RTO Estimation

cwnd

Congestion Window Size

ssthresh

Slow Start Threshold

τa

Round Trip Delay at wireless link

η

Number of Retransmissions

F

Total number of files

N

Number of receivers

Kf

Number of packets in file f

KT

Total number of packets

Pf ,k

Packet-k of file f

Ci [t]

State of ith channel in time slot t

P [t]

The packet chosen for transmission in slot t

Kcode

The number of packets coded together

RShed,f

The average number of cycles for Scheduling

RN C,f

The average number of cycles for network coding

TRR,Shed,f

Average time slots to complete file f with scheduling

TRR,N C,f

Average time slots to complete file f with Network Coding

ǫ

The channel error rate

KT,1

Number of packets in first queue

x

CHAPTER 1 INTRODUCTION

1.1

Overview

The Internet is the most widely used computer network in the world. Apparently, it is a global system that interconnect private, public, academic, business, and government networks, of local to global scope. 1.9 billion people i.e. 30% of the world population are using the Internet on 2010.The main set of communications protocols used for the Internet and other similar networks is the Internet Protocol Suite which is commonly named as TCP/IP stack, because Transmission Control Protocol (TCP) and the Internet Protocol (IP) are the first two and the most important protocols in it. The emergence of new applications, such as social networks, video streaming and peer-to-peer applications cause to increase the usage of Internet continuously. However, the transport layer of the Internet has only slightly changed since its early days and TCP still dominates in the Internet. Typically over 90% of the traffics is carried over TCP. TCP (Postel, 1981) was originally designed for wired networks, where random packet error rate is negligible, and congestion (Allman et al., 1999) is the main cause of packet loss. Therefore, the basic principle is that TCP assumes that packet losses and unusual delays result from congestion in the network. However, this assumption does not hold for all the cases. The end-to-end paths can include wireless links together with wired links. For example, Wi-Fi Internet access at home, in public hot-spot or at work. Most of the cases, there is a wireless access point at the user end of the end-to-end paths. The packets losses are higher in wireless environment. There are loss factors such as high bit error rate, unstable channel conditions, interference and user mobility may all contribute to packet losses. These kinds of losses make TCP inappropriately decrease the data rate, resulting into underutilization of the available bandwidth. TCP New Reno (Floyd and Henderson, 1999) which is simply referred as TCP has been shown (Caceres and Iftode, 1995) to perform poorly in a wireless environment due to these reasons. Moreover, the shared access feature of wireless networks may incur congestion. This is leading to correlation between random and congestion losses, thereby requiring smart analysis of information brought by those losses, so as to take proper decisions about which rate to use. There are several approaches proposed in order to overcome these problems. • Modifications to TCP (e.g. Westwood TCP (Mascolo et al., 2001) )

• Advanced cross layers mechanisms to make TCP aware of the physical link characteristics (e.g., ELN (Yun, 2009))

• Coding approaches. Network coding is a popular approach to improve performance in wireless networks, (e.g. Network coding layer (NCL) (Sundararajan et al., 2009.)) • Scheduling, (e.g. size-based scheduling approaches where the flows closest to completion are favored (Heusse et al., 2010)). • Recent advances in the wireless technology, e.g. MIMO transmission techniques also influence and possibly improve the performance of TCP. Still it is an open question to determine the most promising solution for throughput degradation problem of TCP over wireless links. An ideal solution should work in all 1

scenarios, given that highly different situations are possible due to the inter-play of several factors such as network architecture , link qualities, homogeneity or traffic load.

1.2

Statement of the Problem

A typical Wireless link has a higher packet drop rate than a wired link. Therefore, commonly used versions of TCP (e.g. TCP new Reno) can misinterpret these packet errors as packets may drops due to congestion. As a result, the performance of the TCP connection over a wireless link may degrade significantly.

1.3

Objectives of the Study

This research study is mainly focused on the improvement of the performance of the TCP over a wireless link by using network coding at MAC layer. Our objectives are to: 1. Identify the impact of MAC layer retransmission on TCP Throughput Performance over Wireless LANs The MAC layer is retransmitting dropped packets up to the pre-defined number of tries before it notify a packet drop to the upper layer. These retransmissions are increasing the round trip time of the packets. Hence the retransmission time out (RTO) estimations in TCP can expire leading to possibly spurious retransmissions. We identified the requirement/impact of MAC layer retransmission for a TCP session. 2. Use the network coding approaches to identify the possible improvements for link delay at the MAC layer. We compare and identify the performance of the following scheduling policies with and without network coding. • Round robin

• shortest remaining time • Run2C

3. Analyze the performance of the intra session and inter session cording schemes for round robin scheduling policy.

1.4

Scope and Limitations of the Study

We made a number of assumptions thoughout this study that we list 1. Perfect acknowledgment channel 2. Network coding is applied at MAC layer 3. No additional overhead in occur when network coding is used 4. MAC layer link delay is the performance metric

2

1.5

Structure of the Report

The report is organized as follows. In next chapter (Chapter 2), we relate the literature review regarding our research study. First we discuss the impact of wireless delay on TCP and some evolution of TCP to tackle this problem. An introduction to network coding and coding approaches is also appended to this chapter. Last section of chapter 2 contains the scheduling approaches that we used to our simulations. Chapter 3 contains our experimental results and conclusion about the impact of MAC layer retransmissions on TCP throughput performance over wireless LANs. In the first section in chapter 4, we explain the simulation approaches, system model and simulation settings which used for simulations in chapters 4 to 6. The rest of the chapter 4 aims to provide simulation results on the experiment to obtain delay performance gains from network coding without MAC acknowledgments for different scheduling schemes such as different file sizes case, symmetric channel conditions case, asymmetric channel conditions and progressive arrivals of file. We implemented the MAC layer acknowledgments using the same simulation setup in chapter 4 and provide simulation results with analytical explanations in chapter 5. In chapter 6, we compared the performance of intra session and inter session cording schemes for round robin scheduling policy. Finally in chapter 7, we summarized the results obtained during the research study and we provide concluding remarks.

3

CHAPTER 2 STATE OF THE ART An initial phase of our research study was to identify the particular problem to address and conduct a survey to identify the related works. This section contains state of the art and the background information needs for the rest of the chapters. A brief description about the impact of wireless delay of TCP is placed at the beginning of the chapter. Then we detailed different modified versions of TCP that have been proposed for wireless networks. The introduction to network coding and coding approaches is included after it. The last section of the chapter contains the scheduling approaches that we used to our simulations.

2.1

Impact of Wireless Delay on TCP

The evolution of the communication networks was dramatic during the past decades. The traditional voice and data networks have moved from circuit switching technologies to packet switching technologies and they have converged into integrated multimedia networks. The horizon of the converged and integrated network is extending further to incorporate wired and wireless technologies. Theses hybrid networks of wired and wireless are becoming a reality and used all around the globe today. The enormous development of wireless technologies is driven by the availability of more and more services in wireless networks that are provided only in the wired networks such as e-mail, World Wide Web, multimedia applications, e-commerce, and so forth which are initially provided only in wired networks. Gradually, wireless networks will able to carry almost similar traffics as the wired networks. Transmission Control Protocol (TCP) (Postel, 1981) is carrying the majority of traffic in the current wired networks. It implies that TCP will be dominating in the future wireless networks as well. Therefore, it is important to study the adaptability of TCP for wireless networks. Transport layer protocol (TCP) (Postel, 1981) is an important and widely used layer four transport protocol of the open system interconnection (OSI) architecture. Furthermore, TCP is the dominant transport layer protocol along with UDP in Internet. TCP uses the basic IP services and provide an end-to-end and connection-oriented packet transport mechanism by adding reliability and ensuring the ordered delivery of data between applications. TCP was originally drafted in RFC 793 in September 1981 (Postel, 1981) and it was primarily designed for wired networks. Random bit error rate (BER) is negligible in wired networks. Furthermore, it is assumed that the main cause of packet loss is congestion. Sequence numbers are used to assure the ordered delivery of packets and an unique sequence number associated with each TCP packet. A TCP receiver acknowledges only for successfully received in-order packets unless selective ack is used. These acknowledgments are sending to the sender by the receiver and it contains the sequence number of the next expected packet. Therefore, packet loss or reception of out of order packets indicates failures. TCP implements a flow control mechanism based on the sliding window algorithm (Allman et al., 1999) and a congestion control mechanism based on additive increase multiplicative decrease (AIMD) [4] algorithms to mitigate above failures. However, this original wired network oriented TCP protocol needs to be evolved to address the challenges introduced by the wireless networks. Tremendous evolution of wireless technologies and ever increasing user demands are the two main factors which cause to the TCP/IP protocols suite to outspread 4

its abilities to address the aspects of wireless networks. In near future, all most all networks will most likely be consist of both wired and wireless links. Therefore, TCP has to adapt to these heterogeneous and hybrid networks. However, TCP that relied and performed well on in wired networks exhibits some performance weaknesses in these hybrid environments. There are some unique characteristics of wireless links compared to wired links that make TCP more vulnerable in wireless environments. Furthermore, the packet loss model is a key design assumption of the current TCP protocol and it partly overturns for the case of wireless links. As a result, TCP connections over wireless links are facing various problems, such as inefficient utilization of network resource, throughput degradation, and excessive interruption of data transmissions. (Lakshman and Madhow, 1997) (Lefevre and Vivier, 2000) (Tian et al., 2005). The transmission medium of wireless links is open air. In contrast to the fiber optical networks or copper wired networks, wireless links are vulnerable to several issues due to this open air medium. They are many uncontrollable factors which can affect the quality of a wireless link such as urban obstacles, weather condition, multipath interferences, movements of large objects, hidden terminals and mobility patterns of wireless end devices (Tian et al., 2005). Consequently, the bit error rate (BER) is much higher in wireless links than wired links. Moreover, TCP connections can be temporally disconnections and reconnections on a wireless link during an ongoing communication session due to radio coverage limitations and frequent hand-offs caused by the mobility of users. However, such a short disconnection of a session can actually extend the TCP transmission for a much longer period than expected. In (Tian et al., 2005), authors used a counter example to show the impact of these short disconnections (Fig:2.1). We can see a link disconnection of 10ms caused to have a pause of 1s in the TCP session. Furthermore, the congestion window (CWND) has set to minimum value. As throughput of a TCP session results directly from the evolution of the congestion window, the throughput of the session is dramatically reduced. Link asymmetry is also problematic for TCP performance in a wireless link. Usually, downlink bandwidth is higher than the uplink bandwidth. This will not be problematic wired networks as the transmission error probability is much smaller than a wireless link. Thus, most analytical and simulation based studies of TCP on wired networks ignore the impact of the acknowledgments due to smaller size of the ACK packets compared to data packets and lower BER. Therefore, most TCP versions assume that packet loss occurs only in the downlink. However, it is tricky for the TCP performance of a wireless link when the forward and reverse paths have different capacities (Balakrishnan et al., 1997). In the cellular networks, the downlink from the base station to the mobile device consumes more bandwidth than the uplink from mobile to base station. Furthermore, a base station has much higher transmission power than that of a mobile device. Therefore, the uplink may have some packet losses even when the downlink is working properly. This poor uplink channel condition may have effects on ACK feedbacks. This situation will be identified as network congestion by the sender and it will reduce the sending rate unnecessarily. As a result, TCP performance degrades drastically. Other than the high BER problem, there are some different types of challenges which are unique for each network. For instance, handoff, limited coverage, long propagation delay and user mobility (Tian et al., 2005).

5

Figure 2.1: The effect of a short disconnection in TCP transmission (Tian et al., 2005)

2.2

Modifications to TCP

The standard TCP proposed for a wired network is not working properly in a wireless network. Therefore, it is necessary to adapt TCP. This section contained the evolution of the TCP from the basic TCP. 2.2.1

TCP Tahoe

We have included here the first version of TCP which is TCP Tahoe to explain the basic operations of TCP. TCP Tahoe was mainly using few algorithms (Jacobson, 1988). They are named as slow start, congestion avoidance, fast retransmit and the retransmission time out (RTO) estimation. A brief description of each algorithm is mentioned below. • Slow start

Every connection is starting using the slow start algorithm. The congestion window size (cwnd) is set to 1 Maximum Segment Size (MSS) of the connection at the beginning of the slow start algorithm. The MSS is defined as the maximum size of a TCP packet. In the slow start algorithm, cwnd is doubled every Round Trip Time (RTT) as long as the slow start threshold, (ssthresh) is not reached.

• Congestion Avoidance

Congestion avoidance algorithm will be executed when CWND exceeds the ssthresh. When the cwnd is higher than ssthresh the probability to have a congestion is 6

higher and a congestion could happen at any time. Therefore, the congestion window is increased by only 1 MSS at every RTT during congestion avoidance phase. This is called as additive increase. This phase will be continued until a packet is dropped. • Fast Retransmit

Fast retransmit phase is used to resend a packet which was lost during the transmission. According to fast retransmit mechanism , the TCP sender assumed that a packet is lost on the path, after the reception of the three DUPACK. Then the sender retransmit the particular packet and meantime it has to do two tasks, 1. The threshold of the slow start phase is set the half of the last CWND value. (Multiplicative Decrease) 2. CWND value is set to 1 and the connection is restarted with slow start phase

• Retransmission Time Out (RTO) Estimation

If a packet get lost (suppose packet id=i), receiver will send an ACK by requesting packet i for every successfully received data packet with id > i. These ACKs are called as DUPACKs. The sender executes fast retransmit after three DUPACKs in order to recover the lost packet.

However, there are some cases where the sender will not receive three DUPACKs for a packet loss when the congestion window size is not large enough and no more data packets are sent after the ith packet. Therefore, fast retransmit will not be executed. RTO comes to play on such cases. The sender will resend the non-acknowledged packet after the expiration of the timer called RTO. The RTO estimation algorithm works as follows (Postel, 1981), RT O = SRT T + K ∗ RT T V AR

(2.1)

SRT T = (1 − α) ∗ SRT T + α ∗ R′

(2.2)

RT T V AR = (1 − β) ∗ RT T V AR + β ∗ |SRT T − R′ |

(2.3)

where and

SRTT is the Smoothed RTT and the RTTVAR is the RTT variation. K=4, α =0.25 and β = 0.125 in the RTO estimation algorithm. 2.2.2

TCP Reno

TCP Tahoe is capable to make the Internet is running. However, it underutilized the available resources of the network and the throughput performances are degraded. The main reason was the restoration of the connection after every retransmitted packet. TCP Reno (Stevens, 1997) solved this problem by improving the TCP Tahoe mechanisms. To this end, it included a new mechanism called fast Recovery. • Fast Recovery Fast recovery algorithm is always executed after fast retransmit. It consists mainly in the execution of congestion avoidance. Since slow start is not executed cwnd is not reinitialized but it set to the half of the previous cwnd. Thus, TCP Reno improved the average throughput of TCP Tahoe flows. 7

Therefore, TCP Reno will reexecute the slow start only after a Timeout. 2.2.3

TCP New Reno

Even though TCP Reno has improved the performance of the TCP Tahoe, it will succeed when a few packets are lost during the connection. It cannot tolerate burst packet losses. However, these kind of events can be happen during a wireless link. The link can be disconnected for some time and it may cause a burst error. When a large amount of packets belonging to the same congestion window are lost, TCP Reno executed fast retransmit several times. Finally it will end up with a very small CWND. Furthermore it will not execute the slow start phase but the slow congestion avoidance phase. The main purpose of TCP New Reno (Floyd et al., 2004) was to overcome this problem. TCP new Reno is introduced some important changes to the fast retransmit and fast recovery algorithms of TCP Reno. During the fast retransmit phase, TCP new Reno will not finish the phase as long as the sender knows that a packet from the same congestion window needs to be retransmitted. This was the key change of the fast retransmit phase in TCP New Reno. 2.2.4

TCP Vegas

TCP Vegas (Brakmo and Peterson, 1995) is another TCP version which was proposed to enhance the performance over wireless networks. TCP Vegas modifies the RTT calculation strategy proposed for TCP Tahoe. TCP Vegas calculate the average RTT by recording the time when a packet is sent and comparing this value with the time at which the respective ACK is received. TCP Vegas is able to calculate a more accurate RTO estimation using this method. Furthermore, when a DUPACK is received Vegas check the difference between the current time and the timestamp recorded for the relevant segment. If it is greater than the timeout value, TCP Vegas retransmits the segment without waiting for three DUPACKs. TCP Vegas uses a ”multi bit signal” system. It is a key change made by TCP and it allows TCP Vegas to detect a congestion before the loss of a packet . Therefore, Vegas can adapt the congestion window of the sender to the new conditions by avoiding the congestion. The hypothesis used for this prediction is the increase of the RTT. Vegas assumed that the increase of the RTT indicates congestion in the network. TCP Vegas will have 3 statuses for cwnd evolution as linearly increases, linearly decreases; and leaves unchanged. Since TCP Vegas has an unchanged status when its current sending rate is approximately equal to the expected, TCP Vegas could maintain the stability in the intersection point of the fairness line and the efficiency line. Hence, TCP Vegas is eliminating the unstable behavior of TCP. In case of loss event, TCP Vegas enters the fast recovery phase and halving cwnd which is same as a standard TCP. 2.2.5

TCP Westwood

TCP Westwood (TCPW) (Casetti et al., 2002) is another modification of standard TCP in order to provide a good performance for TCP over wireless noisy links. It modified the congestion control algorithm of the standard TCP. In TCPW, the sender sets the congestion window and the slow start threshold sizes after a congestion occurrence by using the estimated available bandwidth. The basic goal of TCP Westwood 8

is to avoid huge reduction of the congestion window and the slow start threshold sizes. This is achieved through the procedure of setting the congestion window and the slow start threshold sizes after a congestion event (Lopez, 2008) If (n duplicate ACKs are received) ssthresh = (BW E ∗ RT T min)/segsize; If ( cwin > ssthresh) cwin = ssthresh; End End where, BWE is an estimated value of bandwidth, RTTmin is the smallest RTT value observed during the connection time and segsize is a length of TCPs segment payload. As a result, it guarantees a faster recovery after a packet loss while providing an effective congestion avoidance mechanism. Bandwidth estimation is the key point of TCP Westwood. It measures the bandwidth using a simple formula related to the amount of data sent by the sender at the time of receiving an acknowledgment. Moreover, the authors of (Casetti et al., 2002) showed that the main advantage of new implementation of TCP is friendliness. 2.3

Network Coding and Coding Approaches

Network coding is a fresh and sharp tool in the networking field which has the potential to open up new areas of research. The main idea behind the network coding is to provide opportunity to mix the data at the intermediate nodes. Hence, the receiver will receive a coded data packet. The receiver collects these coded data packets and decodes them to extract later the original data packets. Network coding is useful when there are bandwidth shearing of data streams. It is totally different behavior from the traditional operation of network which is trying to avoid bandwidth shearing of data streams as much as possible. Therefore, network coding approach do provides some surprising results in the network field. The most common and the easiest example to explain the network coding is the butterfly network example. (Ahlswede et al., 2000). In the butterfly network, there are two sources (A and B), and two destination nodes at the bottom. Each edge can carry only a single packet at one time slot. When there is no network coding and only routing is available, then the middle link can carry a packet from A or B at a given time slot. Therefore, it is not possible to transmit both A and B simultaneously to both destinations with the capacity of two by using routing only. However, Network coding is allowing both A and B to send data along the middle link on same time slot (see figure 2.2). The intermediate node will send some of packets from A and B through the center link. The receiver at the left receives A and A+B. Then it can find B by subtracting. The receiver at the right also can do the same procedure. Therefore, this simple coding approach increases the performance of the network. Network coding can be considered as a significant potential approach to enhance the operation and performance of wireless networks. Its ability to mix data packets across flows and across time makes the transmission of data over lossy wireless links 9

Figure 2.2: The Butterfly Network

robust and effective. As network coding is a recent field of research, it is not clear enough how to or when to used network coding in present networks. 2.3.1

Inter Session and Intra Session Coding

Network coding can be classified into two types. 1. Intra-session coding The intra-session coding will mix the data packets that belongs to single flow across time to make the coded packet 2. Inter-session coding The inter-session coding will mix the data packets that belongs to several flows and make coded packets for transmission On a unicast transmission over wireless network, the most common approach for data transmission is to relay on a scheduling approach. Information is transmitted to one of multiple receivers as a function of their channel conditions. Network coding can be used for this scenario in two ways as inter-session coding and intra- session coding. The transmission over a wireless network is lossy. Therefore, some packets can be loss or corrupted during the transmission. When we use the scheduling approach, it needs to retransmit lost packets in order to recover the file. These retransmissions depend on the acknowledgment mechanism. However, all the lost packets must be retransmitted until the moment they are successfully received by the receiver. If network coding is used it only needs to send a new coded packet with different linear coefficients. This circumvents identification and retransmissions of the lost packets. With scheduling, the sender needs to keep the track of lost packets for scheduling approach which is not needed for coding approach. If the inter-session coding is used, the unicast transmission will be converted in to a multicast transmission. Therefore, network coding will enable the overhear feature of the wireless channel to use. There are several coding schemes which are proposed to improve the throughput of wireless networks(e.g. (Heusse et al., 2010))).However it is an open question to find the optimal coding approach for a wireless network. 10

2.4

Scheduling Approaches

The legacy scheduling policy in todays networks is First In First Out (FIFO). FIFO is the easiest policy to implement but has a number of weaknesses in wired and wireless networks, especially related to fairness, e.g., fairness among small and large flows (Bansal and Harchol-Balter, 2001), or the TCP unfairness issue in WLAN netwoork, where uploads can monopolize the bandwidth at the expense of downloads (Heusse et al., 2003). We consider in the present work to alternative scheduling policies to FIFO, namely RR, SRPT and Run2C. Those policies aim at improving the fairness over FIFO and also, for the case at SRPT and Run2C, at accounting for the variability of the size of transfers as typical Internet traffic consists of a lot of small flows and a few large flows, the latter representing the majority of the bytes. 2.4.1

Round Robin Algorithm

Round robin (RR) is one of the simplest and easily implementable scheduling algorithms. According to the round robin scheduling algorithm assigns service time in circular order. It gives an equal priority for all the tasks. Therefore, round-robin scheduling algorithm is simple and easy to implement. Furthermore it is starvationfree. Round-robin scheduling can also be applied to data packet networks. 2.4.2

SRPT Algorithm

SRPT scheduling policy is always giving service to the task with the shortestremaining processing time (SRPT), i.e the task which is the closet to complete. SRPT is the optimal scheduling policy in terms of minimum mean response time. (Bansal and Harchol-Balter, 2001) However it is impractical to implement this optimal SPRT policy for all the scheduling scenarios. First reason is the lack of prior knowledge of the size of a task. In some cases, it is difficult to distinguish the size in advance and SRPT cannot be applied. However, there are some cases that can estimate the size of the task. For example, when an access point is selecting the next packet to be transmitted, it can select the packet with the smallest size. Also, on the server size, one can use the size of the data to be transmitted as an estimate of the service requirement. A second reason is the confusion of the performance improvements of SRPT over traditional scheduling policies like PS. It is not clear whether this performance improvement is significant. Indeed, while SRPT has the potential to significantly improve the performance of short flows that represent in practice the majority of the flows, it can lead, in some situations, to the starvation of long lived flows. 2.4.3

Run2C Algorithm

The behavior of the TCP congestion control reveals a number of factors that negatively affect the performance of short flows. Short flows complete their data transfer during the slow start phase. However, even if the network is completely uncongested, the duration of a transfer during slow start is dominated by the round trip time (RTT) of a connection, which is in general much longer than the time to actually transfer the packets of short flows. Short TCP flows also have poor loss recovery performance since they often do not have enough packets in transit to trigger the fast retransmit mechanism. Instead, they must rely on the retransmission timeout to detect losses, 11

which can significantly prolong the transmission time of a short TCP flow. (Rai et al., 2004). Therefore, it is important to treat the short flows in different manner. Run2C scheduling algorithm is basically designed to differentiate short and long TCP flows and provide the services according to the flow size. There are several reasons to favor short flows based on user ergonomics, design of TCP congestion control, file size distribution and queuing theory. (Avrachenkov et al., 2004) Run2C scheduling algorithm is a novel mechanism and it is implemented as a threshold based procedure. Run2C relies on a two queue system. In the first queue, called the high priority queue, one finds all the packets that belong to flows that have sent less than TH bytes. In the second queue, one finds the other packets. The global FIFO scheduler is giving full priority priority to the first queue. The key idea is that TH is chosen small enough so that only small flows are in the first queue, which are the majority of flows (TCP flows in slow-start phase mostly) but should not monopolize the scheduler as they represent a negligible fraction of the total load, say a few percentage.Run2C as opposed to SRPT can be implemented in the different parts of a network such as in access networks on the transmission side, in backbone or more on the reception side of an access network. In (Avrachenkov et al., 2004), authors showed that Run2C produces an significant improvement of performance for short flows, while treating large flows in a similar fashion to the current TCP.

12

CHAPTER 3 IMPACT OF MAC LAYER RETRANSMISSIONS ON TCP THROUGHPUT PERFORMANCE OVER WIRELESS LANS

3.1

Overview

A transport protocol such as TCP is responsible for end-to-end data integrity and flow control. The performance of transport layer protocols over data networks is depending on the medium of the network. In order to consider the behavior of the TCP on different network configurations, we considered a network where the last hop is wireless. In (DeSimone et al., 1993), the authors had analyzed this scenario. They investigated the dependence of the TCP protocol on the link layer retransmission at wireless link. As a wireless link has a much higher error rate, link-layer retransmissions can reduce the error rate on the radio link. However, it may affect the performance of the TCP protocol. The results obtained in (DeSimone et al., 1993) indicate that at low packet drop rates, the TCP protocol has better throughput without link layer retransmissions than with link layer retransmissions. This negative result concerning the bad influence of the MAC layer on the transport layer pops up regularly in many studies. The objective of this chapter is to revisit this claim. Our initial intuition, which turned out to be justified, is that this result was obtained because of a combination of the way wireless networks were designed in the 90s and some analytical assumptions related to TCP that were considered in the paper. We revisit this problem using ns2, simulating a multihop network whose last hop is wireless and governed by 802.11b.

3.2

Network Model

We used the same network model used in (DeSimone et al., 1993).

Figure 3.1: The network model.

We conducted two types of experiments. First, we chose the propagation delay at the wired link to be much higher than the propagation delay at the wireless link. Second, the propagation delay at the wired link is similar to the propagation delay at wireless link.

13

Option

Value

TCP protocol

New Reno

Application

FTP

Sink type

Delay ACK

Wired link Bandwidth

100Mbps

Two-way Delay(Wired link)

120ms

Queue type

DropTail/PriQueue

Queue Length

200 Packets

Radio propagation model

Two Ray Ground

Slot Time

20µs

SIFS

10µs

DIFS

20µs

Distance from BS to node

10m

Two way delay (Wireless link)

6 ms

Maximum data rate (Wireless)

2Mbps

Wireless channel frequency

2.4GHz

Table 3.1: Simulation Setting of experiment 1

3.3

Wired Connection with Higher Delay Than Wireless Connection With 802.11b

The simulation setting of this experiment is described in table 3.1. We voluntarily chose the smallest possible data rate available in the wifi suite of protocol, namely 2Mbps with 802.11b, to be as close as possible to what was simulated in the (DeSimone et al., 1993)’s network. • Average TCP throughput We measured the average throughput of the TCP connection by changing the drop rate. We considered the different MAC layer retransmission limits as well. We study the behavior of the average throughput versus packet drop rate when the latter varies 0 to 0.1. We observed from Figure 3.2, that the average throughput is increasing with the maximum number of link layer retransmissions until 3, and then it is remains almost constant from 4 to 7. It clearly demonstrates that Link Layer Retransmissions (LLR) are useful to have a higher throughput. As we have a higher wired path delay, the influence on round trip time calculation by the LLR 14

Figure 3.2: Average TCP throughput vs drop rate: experiment 1

is minimum. As a result, the LLR here helps avoiding TCP from triggering its loss recovery mechanisms. 3.4

Wired Connection With Similar Delay as Wireless Connection with 802.11b The simulation setting of this experiment is mentioned in table 3.2. • Average TCP throughput

Similar to the previous section,we measured the average throughput of the TCP connection when changing the drop rate and MAC layer retransmission limits. In this experiment (see Figure 3.3), we observed the similar results as previous experiment. The average throughput is increasing with the maximum number of link layer retransmissions until 2, and then it is remains almost constant from 3 to 7. However, in previous experiment, we got a lower throughput for LLR=2 also. Furthermore, the average throughput at LLR=1 is almost th double of the throughput in previous experiment. The influence of LLR to achieve a higher throughput is decreased. As we have a similar latency on the wired and wireless paths, the influence on RTO calculation by the LLR is higher. Therefore, it is possible to have the same throughput with both lower and higher number of LLR values. 3.5

Concluding Remarks

We observed from above experiments that the results obtained in (DeSimone et al., 1993) are not valid for today’s wireless network. Thus, the link layer retransmissions are useful to achieve a higher TCP throughput for all the drop rates. 15

Option

Value

TCP protocol

New Reno

Application

FTP

Sink type

Delay ACK

Wired link Bandwidth

100Mbps

Two-way Delay(Wired link)

12ms

Queue type

DropTail/PriQueue

Queue Length

200 Packets

Radio propagation model

Two Ray Ground

Slot Time

20µs

SIFS

10µs

DIFS

20µs

Distance from BS to node

10m

Two way delay (Wireless link)

6 ms

Maximum data rate (Wireless)

2Mbps

Wireless channel frequency

2.4GHz

Table 3.2: Simulation Setting of experiment 2

16

Figure 3.3: Average TCP throughput vs drop rate: experiment 2

There are two reasons to that that explains the difference in our results as compared to the ones obtained in (DeSimone et al., 1993). 1. Value of K (K is used to add the impact of variation of RRT to RTO calculation. See equation 2.1) has been revised from 2 to 4 by RFC 2988. 2. Random behavior of the MAC layer highly impact on RTO calculations which is omitted in (DeSimone et al., 1993). 3.5.1

Impact of the Value K

We plot the TCP transmission timer values for both K=2 and K=4 cases using MATLAB according to the calculations in (DeSimone et al., 1993). We can observe in figure 3.4 that some of the spurious timeouts are not present when K=4. Therefore, the impact of Link layer transmissions on TCP timer calculation is reduced. As a result, TCP throughput will not be reduced as much as what is suggested in (DeSimone et al., 1993). 3.5.2

Impact of Random Behavior of the MAC layer

IEEE 802.11 based WLAN standard used distributed coordination function (DCF) as the fundamental MAC technique. Distributed coordination function uses a CSMA/CA with binary exponential back off algorithm. According to the DCF, a station wishing to transmit has to listen before transmit. It has wait and listen for a DIFS time interval. If it identified that the channel is busy during this waiting time of DIFS interval, the station will not transmit. There can be several number of stations in wireless medium which are contending for the medium access. Suppose, there are multiple stations detect that the medium is busy and defer their transmission. Then , it 17

Figure 3.4: Impact of value K

may possible that all these users detect the channel is free and then try to seize the channel simultaneously. This will cause collisions. Distributed coordination function uses random backoff algorithm to prevent these situations.Random backoff algorithm forces a station to delay its access to the channel for an additional period. This random backoff period is calculated using following equation (equation 3.1). Backoff Time = Random Number × Slot Time

(3.1)

According to equation 3.1, we can observe that contentions have introduced the randomness for round trip time calculation. It causes high variation of the round trip time. Conversely, the authors of (DeSimone et al., 1993) did not account this MAC layer random behavior. Figure 3.5 contained the variation of the RTT for each case of actual and analytical. We observed that variation of the RTT at actual case is higher than the analytical case at steady state. The average variation is nearly 300% higher in actual case than analytical case. According to equation 2.1, the TRO will have higher value in actual case due to higher variation (RTTVARR) than analytical case. The higher TRO value reduces the number of spurious timeouts. It means that, MAC layer retransmissions will compensate some wireless channel error successfully. Finally, it causes to have a higher TCP throughput. We can observe that actual variation is not start for higher value (1s). NS2 initiates (according to RFC2988) the variation to zero and set it to half of the very first RTT after the first RTT calculation. As a result of these two reasons, we did not encounter any spurious retransmission during the simulation. We can see by comparing the RTO calculations of TCP agent on NS2 and the real RTT (see Figure 3.6).

18

Figure 3.5: Variation of the round trip time

Figure 3.6: Variation of the round trip time

19

CHAPTER 4

Delay Performance Gains from Network Coding without MAC Acknowledgments 4.1

Overview

The delay performance between traditional schemes and network coding has been considered in (Eryilmaz et al., 2006) . They considered a rate-less transmission scenario, where data of fixed length is to be communicated over the channel. They consider two cases. First they assumed that the Channel Side Information (CSI) is available. CSI is defined as the knowledge whether the transmission over the wireless channel succeeded or not, as could be obtained with a perfect feedback channel. They use analytical and simulation results to verified that Longest Connected Queue (LCQ) policy is the optimal policy in order to have the minimum mean completion delay. Also they prove that for their scenario, inter session coding has higher delay than both intra-session cording and scheduling. Second, authors verified that network cording has better performance than scheduling when the CSI is not available. Furthermore, simulation results indicate the intra-session coding is better than the inter session coding without CSI also. In (Eryilmaz et al., 2006), they have used several assumptions as follow, 1. Constant file sizes 2. All the files are available at the sender side at the beginning (No progressive arrivals) 3. Symmetric channel condition (Equal error rate for every channel) 4. No MAC layer acknowledgments.That means, receiver will send per file acknowledgments. The main objective of this section is to check the validity of these results by considering more realistic scenarios.Specially the impact of error rate(ǫ) for the observations. We kept assumption 4, i.e. we have only application layer acknowledgment but we consider variable file sizes and also non homogeneous (asymmetric) channel conditions and progressive arrivals of packets. Removal of assumption 4 will be the topic of the next chapter. We developed a model to study delays in file downloads. 4.2

System Model

We used the same system model used in (Eryilmaz et al., 2006). A wireless network with one base station (sender) and a set of receivers is considered. . We focus is only on the downlink scenario where the base station holds a set of files. The set of files is denoted by F and the set of receivers is denoted by N. File f ∈ F is demanded by the set Nf ∈ N of receivers. A given file f ∈ F is composed of Kf packets, where packet-k of file f is referred to as Pf ,k , its payload is a vector of length m over a finite field Fq if coding is used. KT is the total number of packets where X KT = Kf (4.1) f ∈F

20

Figure 4.1: System Model (Eryilmaz et al., 2006)

We assumed that transmissions occur in time slots. The time slot duration is just long enough to accommodate a single packet transmission. The channel between the base station and the ith receiver is a randomly varying channel. The state of user is channel at slot t is denoted by Ci [t] ∈ {0, 1} . If Ci [t] = 1, receiver-i will successfully receives the packet which is transmitted at slot t and it cannot receive anything if Ci [t] = 0. Ci [t] is considered as a Bernoulli random variable with mean C¯i which are independent across receivers and time. The system model is depicted in figure 4.1.

21

Let us use P [t] denote the packet chosen for transmission in slot t. If the base station is not allowed to code, then at any given slot it must transmit a single packet {k=1,2,,K } from one of the files. Thus, we have P [t] ∈ {Pf,k }{f ∈F } f .This is the typical mode of transmission considered in literature. We will refer to this mode as the scheduling mode (or simply scheduling). If coding is allowed, then in a slot, say t; any linear combination of the packets can be transmitted. Specifically, we have P [t] =

Kf XX

af,k [t]Pf,k

(4.2)

f ∈F k=1

where af,k [t] ∈ Fq for each f ∈ F and k=1,2,......,Kf . The transmitter chooses the coefficients af,k [t] at every time slot t. This mode of transmission will be referred to as the Coding Mode (or simply Coding) henceforth. Similar to (Eryilmaz et al., 2006), we are also interested in minimizing the amount of time necessary for all the files to be transmitted to all the interested receivers. For the rest of the report, we used the Kcode as the number of packets coded together. We used the same Random linear cording strategy used in (Eryilmaz et al., 2006). We assumed that the Galois field size q is large enough where it is sufficient for each receiver to be active Kcode slots on average before it can decode the whole file. Furthermore, random network coding requires ⌈Kcode log2 q⌉ bits of overhead to contain the coefficients of the associated linear combination, where as the packet size is ⌈m log2 q⌉ bits. Thus, for m ≫ K, the overhead is negligible. Henceforth, we will consider this scenario, and ignore the overhead. We considered variable file sizes to obtain more realistic simulation results. We supposed the length of the different files to follow a Pareto distribution as used in (Keller and Beylot, 2008). The density of the Pareto distribution is given by f [x] = αk α x−α−1 where k ≤ x, 0 ≤ x ≤ 2.

(4.3)

k is the minimum size of a file. The minimum file size is 4.5 Kbytes and the maximum size is 20 Mbytes. For the rest of the experiments, we considered that the maximum transmit unit size and a maximum packet size is 1024bytes. The Galois field size is 1024 (q=10). We compared the performance of each scenario with a MATLab simulation. 100 Files selected according the Pareto distribution in equation (4.3). The value for a is calculated in order to enclose the packet size distribution in between 4 and 20480. Therefore calculated α is 0.3575.Every simulation test runs up to 100 times and the averages are plots on the graphs. 4.3

Experiment with symmetric channel conditions

We consider three scenarios in this section with and without network coding following three scenarios. 1. Round Robin (RR) scenario 2. Shortest Remaining Processing Time (SRPT) scenario 3. Run2C scenario It is assumed that Ci [t] = 1/2 for all the channels for all time period.Ci [t] is independent of time, therefore we use Ci instead of Ci [t] for the rest of sections in the 22

chapter. We have used intra-session coding for the round robin scenario and SRPT scenario. We set the Run2C threshold at the 66th quantile (60 packets) of the file size distribution, i.e., all files of size smaller than this value are considered as small files and directed to the high priority queue. If the file sizes are larger than 60, first sixty packets of that files go to queue one and rest will go to queue two. We code all the packets belonging to one queue together using inter-session coding in Run2C scenario. Figure 4.2 contains the simulation results for all 3 scenarios with and without network coding. It shows the mean completion time of each file and file are sorted according to number of packets in ascending order from left to right.

14

Mean completion Time(log(s))

12

Round robin SRPT Run2C Coding Round robin(Intra) Coding SRPT (Intra) Coding Run2C(Inter)

10

8

6

4

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.2: Mean completion time of each file (Symmetric channels without MAC ACK)

23

SRPT with Network coding has the best performance over all other scenarios. When we consider all the packets, SRPT has the lowest completion time than other two scenarios. This is in line with queueing theory that tells us that SRPT is the optimal policy in terms of mean response time (see (Nuyens and Wierman, 2008)). Note that theory applies when considering a null arrival rate of flows.It was valid both with or without network coding. Furthermore, completion time is always low for all three scenarios when network coding is enabled. Round robin and Run2C have almost same completion time without network coding. Both round robin and SRPT with intra session network coding have better performance than Run2C with intra network coding. Following subsections contain more explanations about the simulation results for each case with analytical details. 4.3.1

Round Robin scenario (RR)

We assumed that all the files have same priority. Therefore, each cycle we will transmit one packet from each unfinished file. The acknowledgment mechanism is exactly similar to (Eryilmaz et al., 2006). A receiver will be acknowledging once the whole file is received. This setting had been used to reduce the number of MAC layer acknowledgments. Once a file has been acknowledged that file is removed for the next round robin cycles. • Analytical Observations 1. Round robin without network coding Let’s assume that RShed,f is the average number of cycles required by file f in order to deliver it successfully for the corresponding receiver when there is no network coding scheme. As an acknowledgment will be send after the receiver gets the whole file, the sender will not be aware of which packet is lost during the transmission. Therefore, sender will start to send the packets from the beginning as long as it receives no acknowledgments. Let nf to represent the average number of round robin cycles required to transmit all the packets belonging to file f. nf = max+ {ǫn Kf > 1} n∈Z

(4.4)

where ǫ is the error probability of all the channels and 0 < ǫ < 1.Equation 4.4 results from the observation that once all the packets have been sent, there is on average ǫKf packets lots. As the receiver is buffering packets, it needs only the packets that are missing but as the sender is blind (does not know which packets has been lost), it starts a new full transmission. The second time, ǫ of the (ǫKf ) will be lost. This continues as long as one of the packets from the first transmission is still missing. nf = ⌈−

ln Kf ⌉ ln ǫ

(4.5)

Therefore, RShed,f = (nf + 1)Kf

ln Kf ⌉ + 1}Kf (4.7) ln ǫ be the average number of time slots required by file f to RShed,f = {⌈−

Let TRR,Shed,f

(4.6)

24

complete without network coding. Without loss of generality, we sorted the files according to the number of packets in ascending order TRR,Shed,f = F (RShed,1) + [F − 1](RShed,2 − RShed,1 ) + · · · (4.8) · · · + [F − (f − 1)](RShed,f − 1 − RShed,f −1 ) + 1 = RShed,1 + RShed,2 + · · · + RShed,f + [F − f ]RShed,f + f − F =

f X i=1

RShed,i + [F − f ]RShed,f + f − F

(4.9)

The last term (f − F ) result from the fact that the last packet does not have to wait a full round but only the beginning of it. 2. Round robin with network coding Let’s assume that RN C,f is the average number of cycles required by file f in order to deliver it successfully for the corresponding receiver with network coding. We simply need to send additional linear combinations to compensate for the lost packets. Hence, RN C,f =

Kf (1 − ǫ)

(4.10)

Let TRR,N C,f be the average number of time slots required by file f to complete with network coding. Without loss of generality, we sorted the files according to the number of packers in ascending order TRR,N C,f = F (RN C,1 ) + [F − 1](RN C,2 − RN C,1 ) + · · · (4.11) · · · + [F − (f − 1)](RN C,f − RN C,f −1 − 1) + 1 = RN C,1 + RN C,2 + · · · + RN C,f + [F − f ]RN C,f + f − F =

f X i=1

RN C,i + [F − f ]RN C,f + f − F

(4.12)

Let’s analyze the conditions to have a lower completion time without network coding than with coding. TRR,Shed,f ≤ TRR,N C,f

(4.13)

According to equation 4.9 and equation 4.12 f X i=1

{−

ln Ki Ki + Ki } + · · · ln ǫ

f X ln Kf Ki Kf · · · + (F − f ){− Kf + Kf } < + [F − f ] ln ǫ (1 − ǫ) (1 − ǫ) i=1

f f ǫ X −1 X Ki + [F − f ]Kf } { (ln Ki )Ki + (F − f )(ln Kf )Kf } < { ln ǫ i=1 1 − ǫ i=1

25

where 0 < ǫ < 1 Pf

i=1 (ln Ki )Ki + (F − f )(ln Kf )Kf Pf i=1 Ki + [F − f ]Kf

< −{

ln(ǫ)ǫ } 1−ǫ

(4.14)

when limǫ→0 RHS → − inf. when limǫ→1 RHS → 1 < LHS. It implies that the inequality in equation 4.14 is not valid for any error rate (ǫ). Therefore, network coding is improving the performance of the round robin scenario in error prone environments. • Simulations

The channel error rate used for the simulation is 0.5. (ǫ = 0.5)

14 Round robin Coding Round robin (Intra) 13

Mean completion Time(log(s))

12

11

10

9

8

7

6

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.3: Mean completion time of the each file for Round Robin Scenario (Sym-

metric channels without MAC ACK)

26

We can see that network coding has improved the performance on round robin scenario. The percentage of improvement is increasing with the file size. According to figure 4.3, the network coding always has equal or better performance for all file sizes. 4.3.2

Shortest Remaining Processing Time (SRPT) Scenario

Shortest remaining processing time algorithm is assigning the priorities to files according to the length of processing remaining with highest priority going to the files with least processing left. According to our scenario all the files are present at the sender from the beginning. Thus, priorities are assigned according to file sizes. • Analytical Observations 1. SRPT without network coding Let’s assume that RShed,f is the number of cycles required by file f in order to be delivered successfully to the corresponding receiver when there is no network coding scheme. As an acknowledgment will be sent after the receiver get the whole file, sender will not know which packet is lost during the transmission. Therefore, sender will start to send the packets from the beginning. Let nf be the average number of cycles required to transmit all the packets belonging to file f. nf = max{ǫn Kf > 1} (4.15) n

where ǫ is the error probability of all the channels and 0 < ǫ < 1.It is similar to round robin case. ln Kf nf = ⌈− ⌉ (4.16) ln ǫ Therefore, RShed,f = (nf + 1) (4.17) ln Kf ⌉ + 1)Kf (4.18) ln ǫ Let’s take that TSRP T,Shed,f is the average number of time slots required to complete file f without network coding. Without loss of generality, we sorted the files according to the number of packets in ascending order.As all the files are present at the beginning, the SRPT scheduler will serve them in ascending order. Hence, RShed,f = (⌈−

TSRP T,Shed,f =

f X

RShed,i

X

(−

i=1 f

=

i=1

ln Ki + 1)Ki ln ǫ

(4.19)

2. SRPT with network coding Let RN C,f be the average number of cycles required by file f in order to deliver it successfully for the corresponding receiver with network coding. RN C,f = 27

Kf (1 − ǫ)

(4.20)

Let TRR,N C,f be the number of time slots required by file f to complete with network coding. Without loss of generality, we sorted the files according to the number of packets in ascending order TSRP T,N C,f =

f X i=1 f

=

X i=1

RN C,i Ki (1 − ǫ)

(4.21)

To have a lower completion time with network coding than without coding. TSRP T,Shed,f ≥ TSRP T,N C,f

(4.22)

According to 4.19 and 4.21 f X

f X ln Ki Ki (− + 1)Ki ≥ ln ǫ (1 − ǫ) i=1 i=1

where 0 < ǫ < 1 Pf

i=1 (ln Ki )Ki Pf i=1 Ki

≥ − ln ǫ(

ǫ ) 1−ǫ

(4.23)

when limǫ→0 RHS → − inf . when limǫ→1 RHS → 1 < LHS . Therefore, network coding is useful for all channel conditions. It does not depend on error rate. • Simulations

The channel error rate used for the simulation is 0.5. (ǫ = 0.5)

28

14

SRPT Coding SRPT (Intra)

Mean completion Time(log(s))

12

10

8

6

4

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.4: Mean completion time for SRPT scenario (Symmetric channels without

MAC ACK) We can observe that network coding increase the performance of SRPT scenario for all the packet sizes( Figure 4.4). Therefore, simulation results are similar to the analytical results. Short remaining processing time scheduling algorithm gives the priority to small files. 4.3.3

Run2C Scenario

The files are separated in to two queues according to the file length. For that, a threshold value is considered. All the packets up to that threshold from each file will be put in to first queue and the rest in to second queue. We coded all the packets belong to each queue together (Inter-session coding). • Analytical Observations Initially, we considered the first queue only. Lets KT H be the maximum number of packets from a file in queue one and KT,1 the total number of packets in the first queue. According to the Run2C algorithm, some packets from all the files belong to first queue. While all the packets from small files belong to queue one only, some of packets from large files belong to queue one. Let FT H be the number of files which have packets in first queue. Without loss of generality, we sorted the files in ascending order of the file sizes. Thus, KT,1 can be calculated from equation 4.24. KT,1 =

F TH X i=0

Ki + KT H (F − FT H )

1. Run2C without network coding 29

(4.24)

Let’s assume that RShed,f is the average number of cycles required by file f in order to deliver it successfully for the corresponding receiver when there is no network coding scheme. As an acknowledgment will be send after the receiver get the whole file, sender will not know which packet is lost during the transmission. Therefore, the sender will start to send the packets from the beginning. Let nf be the average number of cycles required to transmit all the packets belong to file f. nf = max{ǫn Kf > 1} (4.25) n

where ǫ is the error probability of all the channels and 0 < ǫ < 1. Also Kf = KT H for ∀f ∈ (F − FT H ) nf = ⌈−

ln Kf ⌉ ln ǫ

(4.26)

Therefore, RShed,f = (nf + 1)Kf

(4.27)

ln Kf ⌉ + 1]Kf (4.28) ln ǫ Let TRun2C,Shed,f be the average number of time slots required by file f to complete without network coding. Without loss of generality, we sorted the files according to the number of packers in ascending order RShed,f = [⌈−

TRun2C,Shed,f = F (RShed,1) + [F − 1](RShed,2 − RShed,1 ) + · · · (4.29) · · · + [F − (f − 1)](RShed,f − 1 − RShed,f −1) + 1 = RShed,1 + RShed,1 + · · · + RShed,f + [F − f ]RShed,f + f − F =

f X i=1

RShed,1 + [F − f ]RShed,f + f − F

(4.30)

2. Run2C with network coding Let’s assume that RN C,f,1 (RN C,f,2 ) is the average number of cycles required by file f to deliver the packets in queue 1(queue 2) successfully for the corresponding receiver when there is no network coding scheme. Therefore, (see section 4.3.3 ) RN C,f,1 =

min(Kf , KT H ) (1 − ǫ)

(4.31)

(Kf − KT H ) (1 − ǫ)

(4.32)

and for f > FT H RN S,f,2 =

Let TRun2C,N C,f be the average number of time slots required by file f to complete without network coding. For f ≤ FT H TRun2C,N C,f =

f X i=1

RN C,i,1 + [F − f ]RN C,f,1 + f − F

30

(4.33)

. and for FT H < f ≤ F TRun2C,N C,f =

F X

RN C,i,1 +

f X i=1

i=1

RN C,i,2 + [F − f ]RN C,f,2 + f − F (4.34)

To have a lower completion time with network coding than without coding. We consider only queue 1. TRun2C,Shed,f ≥ TRun2C,N C,f

(4.35)

According to 4.30 and 4.33 f X i=1

· · · + (F − f ){−

{−

ln Ki Ki + K i } + · · · ln ǫ

KT,1 ln Kf Kf + K f } + f − F ≥ ln ǫ 1−ǫ

f f KT,1 X −1 X ln(Ki )Ki + (F − f ) ln(Kf )Kf } ≥ Ki − (F − f )(Kf − 1) { − ln ǫ i=1 1 − ǫ i=1

where 0 < ǫ < 1 f X i=1

ln(Ki )Ki + (F − f ) ln(Kf )Kf

f X ln ǫ Ki +(4.36) ··· {KT,1 − (1 − ǫ)[ ≥ − (1 − ǫ) i=1

· · · + (F − f )(Kf − 1)]}

(4.37)

when limǫ→0 RHS → + inf for some f ∈ FT H . Therefore, inter session network coding does not make any advantage in terms of delay for error-free environment. limǫ→1 RHS < LHS for some f ∈ FT H . When file is larger than a certain size, inter session network coding is better than scheduling under Run2C scheduling policy. Furthermore, if we consider the completion time of all the users, network coding is useful for error prone environment. • Simulations According to the packet size distribution, up to the 60 packets from each file belong to the first queue. The channel error rate used for the simulation is 0.5. (ǫ = 0.5)

31

14 Run2C Coding Run2C (Inter) 13

Mean completion Time(log(s))

12

11

10

9

8

7

6

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.5: Mean completion time of the each file for RUN2C Scenario (Symmetric

channels without MAC ACK) We can see that network coding has improved the performance for some file sizes in both queues. Furthermore, the time to complete all the files is lower for network coding for both queues than scheduling approach. The minimum error rate that has a better performance with inter session network coding can be calculated as follow. Let’s substitute f = FT H for the inequality in equation 4.36 where that is the time to complete all the files in queue 1. Then, F TH X i=1

(ln Ki )Ki + (F − FT H ) ln(KT H )KT H

F TH X ln ǫ {KT,1 − (1 − ǫ)[ Ki + · · · ≥ − (1 − ǫ) i=1

· · · + (F − FT H )(KT H − 1)]}

32

For our experiment KT,1 = 3014, KT H =60, FT H = 66 and LHS =

F X i=1

PFT H i=1

= 1064

(ln Ki )Ki + (F − FT H ) ln(KT H )KT H

= FT H E{(ln Ki )Ki } + (F − FT H ) ln(KT H )KT H Z 60 = FT H α4αKi −α (ln Ki ) + (F − FT H ) ln(KT H )KT H 4

= 10501.08 F TH X ln ǫ RHS = − {KT,1 − (1 − ǫ)[ Ki + (F − FT H )(KT H − 1)]} (1 − ǫ) i=1 ln ǫ {3014 − (1 − ǫ)1836} (1 − ǫ) ln ǫ ∼ 1178 = − (1 − ǫ) = −

According to equation 4.36, inter session network coding is useful for ǫ ≥ 1.3461 x 10−4 . It means, if the channel error rate is higher than 1.3461 x 10−4 , mean completion time of all files is lower with inter session network coding than scheduling under Run2C algorithm.

4.4

Experiment with asymmetric channel conditions

We assume here that channel conditions are normally distributed between 0 and 1 with the mean(µ) of 0.5 and standard deviation(σ) of 0.125. The probability distribution of the channel conditions is mentioned in equation 4.38. f [x] = √

(x−µ)2 1 e− 2σ2 2πσ

(4.38)

The figure 4.6 shows the above probability distribution of the channel conditions.

33

3.5

3

2.5

Probability

2

1.5

1

0.5

0

0

0.1

0.2

0.3

0.4

0.5 Channel Error Rate

0.6

0.7

0.8

0.9

1

Figure 4.6: The probability distribution of the channel conditions

We used the Pareto distribution of file sizes as used in (Keller and Beylot, 2008). It has mentioned in equation 4.3 and the parameters are same as the experiments in chapter 3. All three scenarios considered on chapter 3 with symmetric channel conditions had been considered here also. 1. Round Robin (RR) scenario 2. Shortest Remaining Processing Time (SRPT) scenario 3. Run2C scenario Figure 4.7 contains the simulation results for all 3 scenarios with and without network coding. It depicts the mean completion time of each file sorted according to number of packets in ascending order from left to right for clearness.

34

14

Mean completion Time(log(s))

12

Round robin SRPT Run2C Coding Round robin(Intra) Coding SRPT (Intra) Coding Run2C(Inter)

10

8

6

4

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.7: Mean completion time of the each file (Asymmetric channels without MAC

ACK) SRPT with network coding has the best performance over all other schemes. Furthermore, completion time is always low for all three scenarios when the network coding is enabled. Round robin and Run2C need almost the same time to complete all the files without network coding. Both round robin and SRPT have better performance than Run2C with network coding. These simulation results were almost similar to the results obtained with symmetric channel condition ( figure 4.2). However, the mean completion time of the files belonging to second queue of Run2C scenario deviates significantly from the results obtained with symmetric channel conditions. The following subsections contain more explanations about the simulation results for each case with analytical details about the deviations. Most of the analytical calculations are similar to chapter 3 and we discussed only the differences here. We used similar notations for calculation. 4.4.1

Round Robin scenario (RR)

• Analytical Observations 1. Round robin without network coding According to equation 4.7, the average number of cycles (RShed,f ) required by file f in order to deliver it successfully to the corresponding receiver when there is no network coding scheme is calculated as follow, RShed,f = [E{⌈−

ln Kf ⌉} + 1]Kf ln ǫ

(4.39)

According to equation 4.9, the average number of time slots (TRR,Shed,f ) 35

required by file f to complete without network coding is TRR,Shed,f =

f X i=1

RShed,1 + [F − f ]RShed,f + f − F

(4.40)

Note : Behavior of a convex function Let’s f (ǫ) is a convex function of ǫ within the region ℜ. For convex functions, E{f (ǫ)} ≥ f (E{ǫ}) ln K

⌈− ln ǫf ⌉ is a convex function of ǫ where 0 < ǫ < 1. Therefore, RShed,f is higher for asymmetric channel conditions. As we need to multiply this value by the file size (Kf ) to calculate the TRR,Shed,f , convex behavior increases further for higher file sizes. Furthermore, the different between the average completion times of symmetric and asymmetric channel conditions increases with the file size. 2. Round Robin with network coding According to equation 4.10, the average number of cycles (RN C,f ) required by file f in order to deliver it successfully for the corresponding receiver when there is no network coding scheme is calculated as follow, RN C,f = E{

Kf } (1 − ǫ)

(4.41)

According to equation 4.12, the average number of time slots (TRR,N C,f ) required by file f to complete without network coding is TRR,N C,f =

f X i=1

RN C,i + [F − f ]RN C,f + f − F

(4.42)

1 (1−ǫ)

is also a convex function of ǫ where 0 < ǫ < 1. Therefore, RN C,f is higher for asymmetric channel conditions. As we need to multiply this value by the file size (Kf ) to calculate the TRR,N C,f , convex behavior increase further for higher file sizes. Furthermore, the different between the average completion times of symmetric and asymmetric channel conditions are increase with the file size. To have a lower completion time without network coding than with coding. We must have: TRR,Shed,f ≤ TRR,N C,f (4.43)

According to equation 4.14, we proved that network coding is improving the performance of the round robin scenario in error prone environments under symmetric channel conditions. We want to check the validity of those results for asymmetric channel conditions also. Figure 4.8 contains the graph related to without network coding (RShed,f ) and with network coding (RN C,f ) at the smallest file size. We can observe that without network coding (RShed,f ) is much convex than with network coding (RN C,f ). This behavior increases further for higher file size. Therefore, TRR,Shed,f is increased by higher percentage than TRR,N C,f in 36

asymmetric channel condition scenario. Thus, inequality in equation 4.43 is also not valid and network coding is improving the performance of the round robin scenario in error prone environments under asymmetric channel conditions also.

600 Without Network Coding With Network Coding

500

Value of the function

400

300

200

100

0

0

0.1

0.2

0.3

0.4

0.5 Error Rate(e)

0.6

0.7

0.8

0.9

Figure 4.8: Behavior of corresponding convex functions at the smallest file size

37

1

• Simulations

14

13

Round robin Coding Round robin (Intra)

Mean completion Time(log(s))

12

11

10

9

8

7

6

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.9: Mean completion time of the each file for Round Robin Scenario (Asym-

metric channels without MAC ACK) We can see that network coding has improved the performance in round robin scenario with asymmetric channel conditions. The percentage of the improvement is increasing with the file size. According to figure 4.9, the network coding always has better performance for all the file sizes than scheduling. It validates our analytical calculations. When we compare the simulation results for asymmetric channel conditions (figure 4.9) and symmetric channel conditions (figure 4.3), it can be observed that the delay has increased in asymmetric channel conditions as compared to symmetric channel conditions scenario. Furthermore, this difference is higher for larger file sizes as we calculated. 4.4.2

Shortest Remaining Processing Time (SRPT) Scenario

• Analytical Observations 1. Shortest Remaining Processing Time (SRPT) without network coding According to equation 4.18, the average number of cycles (RShed,f ) required by file f in order to deliver it successfully to the corresponding receiver when there is no network coding scheme is calculated as follows, RShed,f = (E{⌈−

ln Kf ⌉} + 1)Kf ln ǫ

(4.44)

According to equation 4.19, the average number of time slots (TSRP T,Shed,f ) 38

required to file f to complete without network coding is TRun2C,Shed,f =

f X

(E{−

i=1

ln Ki } + 1)Ki ln ǫ

(4.45)

ln K

⌈− ln ǫf ⌉ is a convex function of ǫ where 0 < ǫ < 1. Therefore, RShed,f is higher for asymmetric channel conditions. As we need to multiply this value by the file size (Kf ) to calculate the TRR,Shed,f , convex behavior increases further for higher file sizes. Furthermore, the different between the average completion times of symmetric and asymmetric channel conditions increases with the file size. 2. Shortest Remaining Processing Time (SRPT) with network coding According to equation 4.20, the average number of cycles (RN C,f ) required by file f in order to deliver it successfully to the corresponding receiver when there is no network coding scheme is calculated as follows, RN C,f = E{

Kf } (1 − ǫ)

(4.46)

According to equation 4.21, the average number of time slots (TSRP T,N C,f ) required by file f to complete without network coding is TSRP T,N C,f =

f X i=1

E{

Kf } (1 − ǫ)

(4.47)

1 (1−ǫ)

is a convex function of ǫ where 0 < ǫ < 1. Therefore, RN C,f is higher for asymmetric channel conditions. As we need to multiply this value by the file size (Kf ) to calculate the TSRP T,N C,f , convex behavior increases further for higher file sizes. Furthermore, the different between the average completion times of symmetric and asymmetric channel conditions increase with the file size. To have a lower completion time without network coding than with coding. TSRP T,Shed,f ≤ TSRP T,N C,f

(4.48)

According to equation 4.23, we proved that network coding is improving the performance of the shortest remaining processing time scenario in error prone environments under symmetric channel conditions.We want to check the validity of those results for asymmetric channel conditions also. Figure 4.8 contain the graph related to without network coding (RShed,f ) and with network coding (RN C,f ) at the smallest file size. We can observe that without network coding (RShed,f ) is much convex than with network coding (RN C,f ). This behavior increased further for higher packets size. Therefore, TSRP T,Shed,f is increase by higher percentage than TSRP T,N C,f in asymmetric channel condition scenario. Thus, inequality in equation 4.48 is not valid and network coding is improving the performance of the SRPT scenario in error prone environments under asymmetric channel conditions also. 39

• Simulations

14

SRPT Coding SRPT (Intra)

Mean completion Time(log(s))

12

10

8

6

4

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.10: Mean completion time of the each file for SRPT Scenario (Asymmetric

channels without MAC ACK) We can observe that network coding increases the performance of SRPT scheduling scenario for variable the file sizes (Figure 4.10)with asymmetric channel conditions. The percentage of improvement is increasing with the file size. Therefore, analytical results comply with the simulation results.Short Remaining Processing Time scheduling algorithm gives the priority to smaller files. When we compare the simulation results for asymmetric channel conditions (figure 4.10) and symmetric channel conditions (figure 4.4), we can observe that the delay has increased in asymmetric channel conditions as compare to symmetric channel conditions. Furthermore, this difference is higher for larger file sizes similar to we calculated. 4.4.3

Run2C Scenario

• Analytical Observations Initially, we considered the first queue only. Lets KT H be the maximum number of packets from a file in queue one and KT,1 is the total number of packets in the first queue. Let FT H be the number of files with packets in first queue. Without loss of generality, we sorted the files in ascending order of the file sizes. Thus, KT,1 can be calculated from equation 4.24. 1. Run2C without network coding According to equation 4.28, the average number of cycles (RShed,f ) required by file f in order to deliver it successfully for the corresponding receiver when

40

there is no network coding scheme is calculated as follow, RShed,f = (E{⌈−

ln Kf ⌉} + 1)Kf ln ǫ

(4.49)

According to equation 4.30,the average number of time slots(TSRP T,Shed,f ) required by file f to complete without network coding is TSRP T,Shed,f =

f X i=1

RShed,1 + [F − f ]RShed,f + f − F

(4.50)

ln K

⌈− ln ǫf ⌉ is a convex function of ǫ where 0 < ǫ < 1. Therefore, RShed,f is higher for asymmetric channel conditions. As we need to multiply this value by the file size (Kf ) to calculate the TRR,Shed,f , convex behavior increases further for higher file sizes. Furthermore, the different between the average completion times of symmetric and asymmetric channel conditions increase with the file size. 2. Run2C with network coding We consider queue 1 only here.According to equation 4.33,the average number of time slots (TSRP T,N C,f ) required by file f to complete without network coding is KT,1 TRun2C,N C,f = E{ } (4.51) 1−ǫ 1 (1−ǫ)

is a convex function of ǫ where 0 < ǫ < 1. Therefore, RN C,f is higher for asymmetric channel conditions. As we need to multiply this value by the queue size (KT,1 ) to calculate the TRun2C,N C,f , convex behavior increases further. Furthermore, the different between the average completion times of symmetric and asymmetric channel conditions increase with the queue size.

• Simulations According to the packet size distribution, up to the 60 packets from each file belong to the first queue.

41

14 Run2C Coding Run2C (Inter)

13

Mean completion Time(log(s))

12

11

10

9

8

7

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.11: Mean completion time of the each file for RUN2C Scenario (Asymmetric

channels without MAC ACK) It can seen that network coding has improved the performance for some file sizes in both queues ( Figure 4.11). Furthermore, the total completion times are lower with network coding for both queues. When we compare the simulation results for asymmetric channel conditions ( figure 4.11) and symmetric channel conditions ( figure 4.5), It can be observed that the delay has increased in asymmetric channel conditions than symmetric channel conditions. However this difference is very law for queue one as the total number of packets in queue is low. The different is significant for queue two. Queue two has very high number of packets and the effect of convex behavior of the mean completion time function is significant for queue two.

4.5

Experiment with symmetric channel conditions and progressive arrival of files

We consider the progressive arrival of file scenario which is the next step toward the more realistic cases. We used the symmetric channel condition, because we observed that asymmetric channel condition case does not change the observations of symmetric channel condition. We assumed that files arrival is a Poisson process which is the most commonly used distribution for arrival processes in communication networks. • Poisson Process Poisson process is one of the most important models used in queuing theory. It is a collection of independent random variables which are exponentially distributed. Let – N(t) = number of arrivals in the interval (0, t) – N(t2 ) − N(t1 ) = number of arrival in the interval (t1 , t2 ) 42

We considered a homogeneous Poisson process and a rate parameter λ is used to characterize the process. It is also known as the average arrival rate. The number of events in time interval (t, t + τ ) follows a Poisson distribution with associated parameter τ t. Probability of having K (K= N(t + τ ) − N(t1 )) number of events within (t, t + τ ) is given as follows, P [N(t + τ ) − N(t1 ) = K] =

e−λτ (λτ )K K!

(4.52)

The traffic load (ρ) can be calculate as follow ρ=

λT C

(4.53)

where ρ is the traffic load, T is the time slot and C is the channel capacity. As we used a moderate traffic, we set ρ = 0.5. The channel is capable to transmit a packet in one time slot. According to the file size distribution in equation 4.3, the average file size is 530 packets. Therefore, the average file arrival rate which we used for the simulations is 1/1060. We considered the same three scenarios and similar settings for each case as we used in previous sections. 1. Round Robin (RR) scenario 2. Shortest Remaining Processing Time (SRPT) scenario 3. Run2C scenario Files are arriving according to the Poisson process and all the packets belong to a file are available at once at the access point. Figure 4.12 contains the simulation results for all 3 scenarios with and without network coding. It contained the mean completion time of the each file and file are sorted according to number of packets in ascending order from left to right . SRPT with network coding has the best performance over all other scenarios. It was valid both with or without network coding. Furthermore, completion time is always low for all three scenarios when network coding is enabled. Round robin and Run2C has almost all files completion time without network coding. Both round robin and SRPT have better performance than Run2C with network coding. This behaviors are almost similar to previous two experiments expect the completion times are lower in this case. The number of files waiting for service at particular time is reduced due to progressive arrivals and it makes the difference. The following subsections will contain more explanations about the simulation results for each case with analytical details. 4.5.1

Round Robin scenario (RR)

• Analytical Observations

Since we consider the progressive arrivals, there can be Ft files at the base station which are waiting for service.(0 ≤ Ft ≤ F ). Therefore, calculations are similar to the case of section 4.3.1. Instead of F, we have Ft number of files to consider for each round robin cycle. Therefore, it does not change the results we obtained and still network coding has improves the performance for round robin scenario.

• Simulations 43

14 Round robin SRPT Run2C Coding Round robin(Intra) Coding SRPT (Intra) Coding Run2C(Inter)

Mean completion Time(log(s))

12

10

8

6

4

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.12: Mean completion time of the each file (Progressive arrival without MAC

ACK) The channel error rate used for the simulation is 0.5. (ǫ = 0.5) According to figure 4.13, network coding always has better performance for all the file sizes as we explained in analytical observations. 4.5.2

Shortest Remaining Processing Time (SRPT) Scenario

• Analytical Observations When we consider the coding and non coding scenarios, we have proved in section 4.3.2 that coding improves the performance when all the files (F) are at the receiver. We can deduced that same result will be observed for the progressive file arrival case also, because the number of files at the base station is Ft which is 0 ≤ Ft ≤ F . • Simulations

The channel error rate used for the simulation is 0.5. (ǫ = 0.5)

44

14

Round robin Coding Round robin (Intra)

Mean completion Time(log(s))

12

10

8

6

4

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.13: Mean completion time of the each file for Round Robin Scenario (Pro-

gressive arrival without MAC ACK) we observe that network coding increase the performance of SRPT scenario for all the packet sizes (Figure 4.14). Therefore, analytical results comply with the simulation results. 4.5.3

Run2C Scenario

• Analytical Observations We have proved in section 4.3.2 that coding improves the performance when all the files (F) at the receiver. The expected results for progressive arrival of files case can be deduced using this results. As the number of files at the base station Ft (which is 0 ≤ Ft ≤ F ), it is clearly the same as section 4.3.3 and inter session coding improves the performance of RUN2C scheduling policy. • Simulations According to the packet size distribution, up to the 60 packets from each file belong to the first queue.

45

14

SRPT Coding SRPT (Intra)

Mean completion Time(log(s))

12

10

8

6

4

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.14: Mean completion time for SRPT scenario (Progressive arrival without

MAC ACK) It can be seen from figure 4.15 that network coding has improved the performance for some file sizes in both queues . Furthermore, the total completion times are lower with network coding for both queues as we explained in analytical observation section.

46

14

Run2C Coding Run2C (Inter)

Mean completion Time(log(s))

12

10

8

6

4

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 4.15: Mean completion time of the each file for RUN2C Scenario (Progressive

arrival without MAC ACK)

47

CHAPTER 5 DELAY PERFORMANCE GAINS FROM NETWORK CODING WITH MAC ACKNOWLEDGMENTS

5.1

Overview

The main job of the MAC protocol is to regulate the usage of the medium, and this is done through a channel access mechanism. Therefore channel access mechanism is the core of the MAC protocol. CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance) is the channel access mechanism used by most wireless LANs including WiFi (IEEE 802.11). The basic of CSMA/CA can be explained as follow. The sender has to listen on the desired channel. If the channel is idle (no active transmitters) it sends a packet. If the channel is busy (an active transmitter) the node waits until transmission stops then a further a random period (contention period). If the channel is still idle at the end of this contention period, the node transmits its packet otherwise it repeats the previous process until it gets a free channel. The main problem of the CSMA/CA protocol is that the transmitter cannot detect collisions on the medium. Therefore, IEEE 802.11 uses additional techniques to improve the performance of CSMA/CA by solving this problem. MAC acknowledgment is an additional technique and the principle is quite simple. Each time a node receives a packet, it sends back immediately an acknowledgment to the transmitter to indicate that it has successfully received the packet without errors. If after sending a packet the transmitter does not receive an acknowledgment, it knows that the packet was lost, so it will retransmit the packet. Therefore, we implement this MAC layer acknowledgment as the next step of our work.Chapter 5 focuses on identifying identify the delay performance gain obtained by network coding approaches over the traditional scheduling methods when the MAC acknowledgments are enabled. We used the same system model and simulation setting which we used in chapter 4. 5.2

Experiment with Symmetric Channel Conditions

Similar to the previous experiments, there are three scenarios that we considered in this section. 1. Round robin (RR) scenario 2. Shortest remaining processing time (SRPT) scenario 3. Run2C scenario we used 100 users/flows (F=N=100) and it is assumed that Ci = 1/2 for all the channels. We have used intra-session coding for all three scenario. In addition, inter-session coding is used for the Run2C scenarios. The receiver is sending a MAC layer ACK packet for each successful packet and maximum number of MAC layer retransmission tries is set to 7, similar to 802.11. The size of a MAC ACK packet is 1/25 of a data packet size. Also we assumed that feedback channel is perfect, i.e. the ACk cannot be lost. Figure 5.1 contains the simulation results for all 3 scenarios with and without network coding. It depicts the mean completion time of the each file which are sorted according to number of packets in ascending order from left to right. 48

12

11

10

Round robin SRPT Run2C Coding Round robin(Intra) Coding SRPT(Intra) Coding Run2C(Intra) Coding Run2C(Inter)

Mean completion Time(log(s))

9

8

7

6

5

4

3

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 5.1: Mean completion time of the each file (Symmetric channels with MAC ACK)

We obtained the same performance with and without network coding. It is the most significant difference as compared to previous experiments. The availability of the MAC layer ACK has compensate the advantage of network coding. However, we can see that finished times for all the scenarios with network coding are higher than the results in section 4.3. Therefore, we see that MAC layer ACK has degraded the performance of Network coding. Similar to previous experiments, SRPT has the best performance over all other scenarios. This was to be expected as network coding aims at sending the optimal amount of packet on the channel. Thus, per packet acknowledgments are just additional waiting times. Following subsections contain more explanations about the simulation results for each case with analytical details. 5.2.1

Round Robin Scenario (RR)

We assumed that all the files have same priority. Therefore, each cycle we will transmit one packet from each unfinished file. Per packet MAC layer acknowledgment mechanism is enabled. Once all the packets from file has been acknowledged that file is removed from the next round robin cycle. • Analytical Observations 1. Round Robin without network coding Let’s assume that RShed,f is the average number of cycles required by file f in order to deliver it successfully for the corresponding receiver when there is no network coding scheme. We assumed that a time slot is the time to send a data packet. Therefore, the time to send a Mac ACK is 0.04*1 time slot (which we denote as γ). 49

RShed,f =

(1 + γ)Kf (1 − ǫ)

(5.1)

where ǫ is the error probability of all the channels and 0 < ǫ < 1. Let TRR,Shed,f be the average number of time slots required by file f to complete without network coding. Without loss of generality, we sorted the files according to the number of packers in ascending order TRR,Shed,f = F (RShed,1) + [F − 1](RShed,2 − RShed,1 ) + · · · (5.2) · · · + [F − (f − 1)](RShed,f − RShed,f −1 − 1) + 1 = RShed,1 + RShed,1 + · · · + RShed,f + [F − f ]RShed,f + f − F =

f X i=1

RShed,i + [F − f ]RShed,f + f − F

(5.3)

2. Round Robin with network coding Let’s assume that RN C,f is the average number of cycles required by file f in order to deliver it successfully for the corresponding receiver with network coding. (1 + γ)Kf RN C,f = (5.4) (1 − ǫ) Let TRR,N C,f be the average number of time slots required by file f to complete with network coding. Without loss of generality, we sorted the files according to the number of packers in ascending order. From the calculations in equation 5.2.1 we can deduced the TRR,N C,f as follow. TRR,N C,f =

f X i=1

RN C,i + [F − f ]RN C,f + f − F

(5.5)

According to the above equations and , we can see that the average completion time is equal for both coding and non coding scenarios. TRR,Shed,f = TRR,N C,f

(5.6)

The value of RN C,f with MAC layer acknowledgments case (Equation 5.4)is higher than without MAC ACK scenario(Equation 4.10). This occurred as a result of MAC layer retransmission which is not used in network coding. Therefore, per packet acknowledgments degrade the performance which can obtained by network coding. • Simulations

The channel error rate used for the simulation is 0.5. (ǫ = 0.5)

50

12 Round robin Coding Round robin (Intra)

Mean completion Time(log(s))

11

10

9

8

7

6

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 5.2: Mean completion time of the each file for Round Robin Scenario (Sym-

metric channels with MAC ACK) It can see on figure 5.2 that both network coding and non network coding case have same performance performance on round robin scenario. 5.2.2

Shortest Remaining Processing Time (SRPT) Scenario

Similar to the previous chapter, all the files at the sender at the beginning of the experiment. Therefore, priorities are assigned according to file sizes. • Analytical Observations

The calculation are similar for both coding and non coding scenarios. Therefore, a common analysis is mentioned below. Let RShed,f and RN C,f be the number of cycles required by file f in order to deliver it successfully for the corresponding receiver for no network coding and coding schemes respectively. RShed,f = RN C,f =

(1 + γ)Kf (1 − ǫ)

(5.7)

TSRP T,Shed,f and TSRP T,N C,f is the number of time slots required by file f to complete for no network coding and coding schemes respectively.. Without loss of generality, we sorted the files according to the number of packers in ascending

51

order TSRP T,Shed,f = TSRP T,N C,f =

f X i=1 f

=

X i=1

RN C,i Ki (1 − ǫ)

(5.8)

Therefore,the average completion time for SRPT is equal for both coding and non coding scenarios. However, total completion time with intersession network coding and MAC layer acknowledgments case is higher than without MAC ACK scenario. This is the exactly same behavior for round robin scenario and it is due to the same Reason. It occurred as a result of MAC layer retransmission which is not used in network coding. Therefore, per packet acknowledgments degraded the performance which can obtained by network coding. • Simulations

The channel error rate used for the simulation is 0.5. (ǫ = 0.5)

12

11

SRPT Coding SRPT (Intra)

10

Mean completion Time(log(s))

9

8

7

6

5

4

3

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 5.3: Mean completion time for SRPT scenario (Symmetric channels with MAC

ACK)

52

We can observe that SRPT scenario has the same average completion time for both coding and non coding scenarios.( Figure 5.3). Therefore, analytical results are verified by simulation results. 5.2.3

Run2C Scenario

• Analytical Observations 1. Run2C without network coding Let’s assume that RShed,f,1 (RShed,f,2) is the average number of cycles required by file f to deliver the packets in queue 1(queue 2) successfully for the corresponding receiver when there is no network coding scheme. Therefore, (see section 4.3.3 ) RShed,f,1 =

(1 + γ) ∗ min(Kf , KT H ) (1 − ǫ)

(5.9)

(1 + γ)(Kf − KT H ) (1 − ǫ)

(5.10)

and for f > FT H RShed,f,2 =

Let TRun2C,Shed,f be the average number of time slots required by file f to complete without network coding. For f ≤ FT H TRun2C,Shed,f =

f X i=1

RShed,i,1 + [F − f ]RShed,f,1 + f − F

(5.11)

. and for FT H < f ≤ F TRun2C,Shed,f =

F X

RShed,i,1 +

f X i=1

i=1

RShed,i,2 + [F − f ]RShed,f,2 + f − F(5.12)

. 2. Run2C with intra session network coding The calculations are similar to the scheduling case. According to equation 5.13 for f ≤ FT H TRun2C,N CI ntra,f =

f X i=1

RN CI ntra,i,1 + · · ·

· · · + [F − f ]RN CI ntra,f,1 + f − F

(5.13) (5.14)

and for FT H < f ≤ F TRun2C,N CI ntra,f =

F X

RN CI ntra,i,1 +

i=1

f X i=1

RN CI ntra,i,2 + · · ·

· · · + [F − f ]RN CI ntra,f,2 + f − F 53

(5.15) (5.16)

where RN CI ntra,f,1 = and for f > FT H

(1 + γ) ∗ min(Kf , KT H ) (1 − ǫ)

(5.17)

(1 + γ)(Kf − KT H ) (1 − ǫ)

(5.18)

RN CI ntra,f,2 =

3. Run2C with inter session network coding Let TRun2C,N CI nter,f be the average number of time slots required complete file f with inter network coding. Without loss of generality, we sorted the files according to the number of packers in ascending order for f ≤ FT H TRun2C,N CI nter,f =

(1 + γ)KT,1 1−ǫ

(5.19)

(1 + γ)KT 1−ǫ

(5.20)

and for FT H < f ≤ F TRun2C,N CI nter,f =

To have a lower completion time with Inter session network coding than without coding, we must have: TRun2C,Shed,f ≥ TRun2C,N CI nter,f

(5.21)

We consider in the first queue only for the calculation. According to 5.13 and 5.19 f X i=1

RShed,i,1 + [F − f ]RShed,f,1 + f − F ≥

X (1 + γ)Kf f

i=1

(1 − ǫ)

+ [F − f ]

(1 + γ)KT,1 1−ǫ

(1 + γ)Kf (1 + γ)KT,1 +f −F ≥ (1 − ǫ) 1−ǫ FT H − F ≥ 0

where we considered the worst case of first queue that f = FT H But F > FT H and inequality 5.21 is not holding. Therefore, scheduling and intra session coding have better performance than inter session coding. • Simulations According to the packet size distribution, up to the 60 packets from each file belong to the first queue. The channel error rate used for the simulation is 0.5. (ǫ = 0.5)

54

12 Run2C Coding Run2C (Intra) Coding Run2C (Inter) 11

Mean completion Time(s)

10

9

8

7

6

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 5.4: Mean completion time of the each file for RUN2C Scenario (Symmetric

channels with MAC ACK) We can see that inter session network coding has lower the performance than scheduling for RUN2C scenario.However, intra session network coding and scheduling have same performance which validate the analytical results.

5.3

Experiment with Asymmetric Channel Conditions

In this section, we consider asymmetric channel conditions case. We used that the length of the different files has a Pareto distribution of file sizes as used in (Keller and Beylot, 2008). It has corresponds to equation 4.3 and the parameters are the same as the experiments in chapter 4. Again we consider, 1. Round robin (RR) scenario 2. Shortest remaining processing time (SRPT) scenario 3. Run2C scenario The following figures contain the simulation results when the CSI is absent at the sender. Figure 5.5 presents the simulation results for all 3 scenarios with and without network coding.

55

12

11

10

Round robin SRPT Run2C Coding Round robin(Intra) Coding SRPT(Intra) Coding Run2C(Intra) Coding Run2C(Inter)

Mean completion Time(log(s))

9

8

7

6

5

4

3

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 5.5: Mean completion time of the each file (Asymmetric channels with MAC

ACK) Results are similar to the result that we obtained for the experiment with symmetric channel conditions(see section 5.2). However, these are some deviation from the results in 5.2. The average completed time has increased by some amount for each scenario. The highest increment is shown by the Run2C with inter session network coding. The reason for these deviation is the convexity of the average completed time calculating function. More descriptive explanation for this behavior is contained in the section 4.4. We did not repeat them here as those explanations are valid for this case also. Similar to the previous experiment with symmetric channel conditions(section 5.2), we obtained the same performance for with and without intra session network coding for all three scenarios as we explained in section 4.4 5.4

Experiment with Symmetric Channel Conditions and Progressive Arrival of Files

We consider the same setting used for the section 4.5 and same three scheduling scenario for this experiment as well. 1. Round robin (RR) scenario 2. Shortest remaining processing time (SRPT) scenario 3. Run2C scenario Files are arriving according to the Poisson process and all the packets belong to a file will be available at once at the access point. Figure 5.6 presents the simulation results for all 3 scenarios with and without network coding. It shows the mean completion time of the each file. 56

12

11

10

Round robin SRPT Run2C Coding Round robin(Intra) Coding SRPT(Intra) Coding Run2C(Intra) Coding Run2C(Inter)

Mean completion Time(log(s))

9

8

7

6

5

4

3

2

10

20

30

40

50 File Size Percentile

60

70

80

90

100

Figure 5.6: Mean completion time of the each file (Progressive Arrivals with MAC ACK)

SRPT has the best performance over all other scenarios which was the best for all previous experiments as well. Round robin and Run2C had same performance for last two experiments. However, there is a significant difference in performance of those two schemes in this experiment. Round robin scheduling policy exhibits the worst performance for smaller files and RUN2C exhibits the worst performance for larger files. If we consider a particular scheduling policy we have the exactly same performance for both intra session coding and no coding case. Thus, we can say the calculation on section 5.2.1 is valid for this section as well. Instead of all files(F) at sender, we have to use only Ft number of files for the consideration on a particular time instant t. Therefore, we did not repeat the calculations here.

57

CHAPTER 6 PERFORMANCE ANALYSIS OF INTER-SESSION CODING AND INTRA-SESSION CODING ON ROUND ROBIN SCHEDULING POLICY We compare in this chapter the performance of inter-session coding and intrasession coding on round robin scheduling policy is compared.. The file transfer delay is used as the performance metric. This chapter contains analytical and simulation results for both symmetric and asymmetric channel conditions. We measured the performance when MAC layer acknowledgments are enabled and disabled.

6.1

Symmetric Channel Condition Case without MAC Acknowledgments

When all the files are present at the sender,intra-session coding has better performance over inter-session for constant file sizes (Eryilmaz et al., 2006). In this experiment, we have investigated this results for different file lengths. • Analytical Observations Let KT H be the maximum number of packets that can be coded together in inter session coding scheme. 1. Inter-Session Coding KT H is the maximum number of packets coded together. Therefore, we divide the files into different classes such a way that all the packets belong to a particular class will be coded together. Let FC be the number of classes FC = ⌈

KT ⌉ KT H

(6.1)

Let RInter,f be the average number of cycles required by file f in order to deliver it successfully for the corresponding receiver with inter session network coding. KT H (6.2) RInter,f = (1 − ǫ) Let’s take that TRR,Inter,f is the average number of time slots required by complete the transfer of file f with inter-session network coding. TRR,Inter,f = ⌈

KT KT H ⌉ KT H (1 − ǫ)

(6.3)

2. Intra-Session Coding Let TRR,Intra,f be the average number of time slots required to complete file f and RIntra,f be the number of cycles required to file f in order to deliver it successfully to the corresponding receiver with inter session network coding. RIntra,f =

58

Kf (1 − ǫ)

(6.4)

According to equation 4.12 TRR,Intra,f =

f X i=1

RIntra,i + [F − f ]RIntra,f + f − F

(6.5)

Let’s consider the conditions that need to be satisfied to have a better performance for intra-session coding. Using equation 6.3 and equation 6.5 f X i=1

TRR,Intra,f ≤ TRR,Inter,f Ki Kf KT KT H + [F − f ] +f −F ≤ ⌈ ⌉ (1 − ǫ) (1 − ǫ) KT H (1 − ǫ)

X 1 KT Ki + (F − f )Kf ] − (F − f )(1 − ǫ)} ≤ ⌈ {[ ⌉ where 0 < ǫ < 1 KT H i=1 KT H f

P As {[ fi=1 Ki + (F − f )Kf ] − (F − f )(1 − ǫ)} ≤ KT , this condition is valid for ∀f ∈ F . Therefore, inter-session coding is better than intra-session coding in terms of the delay. • Simulations We have defined the threshold for maximum number of packets code together and did not coded fractions of the files. Therefore, we sorted the files which are less than or equal to the threshold and then grouped these files together such a way that the total number of packets are less than or equal to the threshold. All the packets belong to one group coded together. The packets of the files which are larger than threshold coded together. Therefore, it sees that all the curves are overlapping to curve corresponding to round robin (Intra-session coding).

59

4

12

x 10

Intra Session Upto 10 packets Upto 100 packets Upto 500 packets Upto 1000 packets Upto 5000 packets Upto 10000 packets All packets belong to all files

10

Mean completion Time(s)

8

6

4

2

0

0

10

20

30

40

50 File Sizes Percentiles

60

70

80

90

100

Figure 6.1: Mean completion time for inter and intra session coding for symmetric

channels without MAC ACK We can see that intra-session coding has better performance for all the file sizes. It is comply with the analytical results.

60

6.2

Asymmetric Channel Condition Case without MAC Acknowledgments

When all the files already arrived at the sender, intra-session coding has better performance over inter-session for constant file sizes (Eryilmaz et al., 2006) with symmetric channel conditions. Furthermore, we verified that above results is valid for different file lengths with symmetric channel conditions. also. In this experiment, we has investigated the results for different file lengths with asymmetric channel conditions. • Analytical Observations We used the similar calculation and notations in subsection 6.1. Let’s assume that KT H is the maximum number of packets can be coded together. 1. Inter-Session Coding As previously, the number of classes is: FC = ⌈

KT ⌉ KT H

(6.6)

Also, the average number of cycles with inter session network coding is RIntra,f = E{

KT H } (1 − ǫ)

(6.7)

The average number of time slots required by complete file f with intersession network coding is TRR,Inter,f = ⌈

KT KT H ⌉E{ } KT H (1 − ǫ)

(6.8)

2. Intra-Session Coding In this case, we obtain RIntra,f = E{

TRR,Intra,f =

f X i=1

Kf } (1 − ǫ)

RIntra,i + [F − f ]RIntra,f + f − F

(6.9)

(6.10)

Let’s consider the conditions that need to be satisfied to have a better performance for intra-session coding. Using equation 6.8 and equation 6.10 TRR,Intra,f ≤ TRR,Inter,f

(6.11)

We use the same convexity argument and prove that , inter-session coding is better than intra-session coding in terms of the delay under asymmetric channel conditions also. • Simulations We used the same simulation settings as section 6.1, but change the channel condition according to Gaussian distribution mentioned in equation 4.38

61

4

14

x 10

12

Mean completion Time(s)

10

8 Intra Session Upto 10 packets Upto 100 packets Upto 500 packets Upto 1000 packets Upto 5000 packets Upto 10000 packets All packets belong to all files

6

4

2

0

0

10

20

30

40

50 File Sizes Percentiles

60

70

80

90

100

Figure 6.2: Mean completion time for inter and intra session coding for asymmetric

channels without MAC ACK We can see that intra-session coding has better performance for all the file sizes. It validates the analytical results.

62

6.3

Symmetric Channel Condition Case with MAC Layer Acknowledgments

We obtained that intra-Session coding has better performance over inter-session for constant file sizes (Eryilmaz et al., 2006), variable file sizes with symmetric and asymmetric channel conditions when MAC ACK is disabled. In this experiment, we has investigate this results when MAC layer acknowledgments is available. • Analytical Observations Let KT H be the maximum number of packets can be coded together. 1. Inter-Session Coding Calculations are as section 6.1. Let RInter,f be the average number of cycles required to deliver by file f to the corresponding receiver with inter session network coding. (1 + γ)KT H RIntra,f = (6.12) (1 − ǫ) Let TRR,Inter,f be the average number of time slots required by complete file f with inter-session network coding. TRR,Inter,f = ⌈

KT (1 + γ)KT H ⌉ KT H (1 − ǫ)

(6.13)

2. Intra-Session Coding Using the same types of reasoning as in previous chapters, we obtain: RIntra,f =

TRR,Intra,f =

f X i=1

(1 + γ)Kf (1 − ǫ)

RIntra,i + [F − f ]RIntra,f + f − F

(6.14)

(6.15)

Let’s consider the conditions that need to be satisfied to have a better performance for intra-session coding. Using equation 6.13 and equation 6.15 f X (1 + γ)Ki i=1

(1 − ǫ)

TRR,Intra,f ≤ TRR,Inter,f + [F − f ]

KT H (1 + γ)Kf KT ⌉ +f −F ≤ ⌈ (1 − ǫ) KT H (1 − ǫ)

f X (F − f )(1 − ǫ) KT 1 Ki + (F − f )Kf ] − {[ } ≤ ⌈ ⌉ where 0 < ǫ < 1 KT H i=1 (1 + γ) KT H

P )(1−ǫ) } ≤ KT , This condition is valid for ∀f ∈ F . As {[ fi=1 Ki +(F −f )Kf ]− (F −f (1+γ) Therefore, inter-session coding is better than intra-session coding in terms of the delay. • Simulations We used the same simulation settings as section 6.1 by adding MAC layer acknowledgments 63

4

12

x 10

10

Mean completion Time(s)

8 Intra Session Upto 10 packets Upto 100 packets Upto 500 packets Upto 1000 packets Upto 5000 packets Upto 10000 packets All packets belong to all files

6

4

2

0

0

10

20

30

40

50 File Sizes Percentiles

60

70

80

90

100

Figure 6.3: Mean completion time for inter and intra session coding for symmetric

channels with MAC ACK We can see that intra-session coding has better performance for all the file sizes. It validates the analytical results.

64

6.4

Asymmetric Channel Condition with MAC Acknowledgments

When all the files have already arrived at the sender, intra-session coding has better performance over inter-session for constant file sizes (Eryilmaz et al., 2006) with symmetric channel conditions. We verified that the above results is valid for different file lengths with symmetric channel conditions. also. In this experiment, we has investigated the results for different file lengths with asymmetric channel conditions. • Analytical Observations We used the similar calculation and notations in subsection 6.1. Let’s assume that KT H is the maximum number of packets can be coded together. 1. Inter-Session Coding Let RInter,f be the average number of cycles required by file f in order to deliver it successfully for the corresponding receiver with inter session network coding. (1 + γ)KT H RIntra,f = E{ } (6.16) (1 − ǫ) Let’s take TRR,Inter,f is the average number of time slots required by complete file f with inter-session network coding. TRR,Inter,f = ⌈

KT (1 + γ)KT H ⌉E{ } KT H (1 − ǫ)

(6.17)

2. Intra-Session Coding Let’s take that TRR,Intra,f is the average number of time slots required by complete file f and RIntra,f is the number of cycles required by file f in order to deliver it successfully for the corresponding receiver with inter session network coding. Kf RIntra,f = E{ } (6.18) (1 − ǫ) According to equation 4.12 TRR,Intra,f =

f X i=1

RIntra,i + [F − f ]RIntra,f + f − F

(6.19)

Let’s consider the conditions that need to be satisfy to have a better performance for intra-session coding. Using equation 6.17 and equation 6.19 TRR,Intra,f ≤ TRR,Inter,f

(6.20)

AAgain, by our convexity argument, we obtain that, intra-session coding is better than intra-session coding in terms of the delay under asymmetric channel conditions than inter-session coding. • Simulations We used the same simulation settings as section 6.1, but change the channel condition according to Gaussian distribution mentioned in equation 4.38. Also we added the MAC layer acknowledgments

65

4

14

x 10

12

Mean completion Time(s)

10

8 Intra Session Upto 10 packets Upto 100 packets Upto 500 packets Upto 1000 packets Upto 5000 packets Upto 10000 packets All packets belong to all files

6

4

2

0

0

10

20

30

40

50 File Sizes Percentiles

60

70

80

90

100

Figure 6.4: Mean completion time for inter and intra session coding for asymmetric

channels with MAC ACK We can see that intra-session coding has better performance for all the file sizes. It validates the analytical results.

6.5

Conclusion

The performance of inter-session coding and intra-session coding on round robin scheduling policy is compared in chapter 6. The file transfer delay is used as the performance metric. We have proven that intra-Session coding has better performance than inter-session not only for constant file sizes (Eryilmaz et al., 2006), but also for variable file sizes. This result is valid for different network settings such as symmetric channel conditions, asymmetric channel conditions, with MAC ACK and without MAC ACK. Every simulation results were verified analytically as well.

66

CHAPTER 7 CONCLUSIONS AND FUTURE DIRECTIONS

7.1

Conclusions

This research study was focused on the possible improvements and alterations which can be implemented in order to solve the performance degradation of standard TCP over wireless links by means of scheduling and network coding. We have completed three steps of this ultimate objective. In the first part of the research study we identified the impact of MAC layer retransmission on TCP throughput performance over wireless LANs. In 1993, (DeSimone et al., 1993) showed that MAC layer retransmissions degrade performance for lower error rates. However, the Wireless technologies have been changed rapidly over last two decades. Therefore, we have examined the validity of those results for present Wi-Fi standards. Our are partly opposite to the (DeSimone et al., 1993) and we demonstrate that MAC layer retransmissions are important to improve the TCP throughput over a wireless link. In the second part, we used network coding to identify possible improvements for link delay at the MAC layer. A worthy study on the delay performance between traditional scheduling schemes and network coding has been presented in (Eryilmaz et al., 2006). However, there are some assumptions used for this study. The main objective of our study was to extend this study from towards more realistic scenarios. Therefore, we omitted the above assumptions gradually and examine the performance in terms of delay. Different scenarios have been considered and performances is checked by simulations. Then, simulation results are verified analytically. The results highlighted that network coding(inter session and intra session) improves the performance over scheduling schemes in the absence of MAC layer acknowledgments. Then, both inter session network coding and scheduling schemes have same performance for MAC layer acknowledgments enabled environment. Furthermore, we identified that MAC layer acknowledgments degraded the performance which can achieved by network coding as network coding does not require per packet MAC acknowledgments to its operation. Third part of this research study was to compare the performance of the intra session and inter session coding schemes for round robin scheduling policy. Different threshold to set the maximum number of packets which can coded together during inter session coding were considered. Analytical results and simulations both indicated that intra session coding has better performance over inter session coding for all considered scenarios.

7.2

Future directions • Experiments on MAC layer should be re-investigated at the layer 4 level. It will be useful to identify the real impact on TCP. This will be the next step of this research. • Performance should be analyzed for progressive arrival of packets scenario at different rates.

67

REFERENCES Ahlswede, R., Cai, N., Li, S., & Yeung, R. (2000). Network information flow. IEEE Transactions on Information Theory, IT-46 46: 12041216. Allman, M., Paxson, V., & Stevens, W. (1999). Tcp congestion control. IETF RFC 2581. Avrachenkov, K., Ayesta, U., Brown, P., & Nyberg, E. (2004). Differentiation between short and long tcp flows: Predictability of the response time. In Proc. IEEE INFOCOM. Balakrishnan, H., Padmanabhan, V., & Katz, R. (1997). The effects of asymmetry on tcp performance,. Proc. ACM/IEEE Mobicom. Bansal, N., & Harchol-Balter, M. (2001). Analysis of srpt scheduling: investigating unfairness. SIGMETRICS ’01 Proceedings of the 2001 ACM SIGMETRICS international conference on Measurement and modeling of computer systems. Brakmo, L., & Peterson, L. (1995). Tcp vegas: End to end congestion avoidance on a global internet. IEEE Journal on selected Areas in communications. Caceres, R., & Iftode, L. (1995). Improving the performance of reliable transport protocols in mobile computing environments. IEEE Journal on Selected Areas in Communications, vol. 13, no. 5, pp. 850857. Casetti, C., Gerla, M., Mascolo, S., Sanadidi, M., & Wang, R. (2002). Tcp westwood: End-to-end congestion control for wired/wireless networks. In Wireless Networks,. DeSimone, A., Chuah, M., & Yue, O. (1993). Throughput performance of transport-layer protocols over wireless lans. GLOBECOM , Technical Program Conference Record, IEEE in Houston. Eryilmaz, A., Ozdaglar, A., & Medard, M. (2006). On delay performance gains from network coding. 40th Annual Conference on Information Sciences and Systems. Floyd, S., & Henderson, T. (1999). The newreno modification to tcp’s fast recovery algorithm. IETF RFC 2582. Floyd, S., Henderson, T., & Gurtov, A. (2004). The newreno modification to tcp’s fast recovery algorithm. 3782. Heusse, M., Rousseau, F., Berger-Sabbatel, G., & Duda, A. (2003). Performance anomaly of 802.11b. In Proceedings of the 22th IEEE Conference of the IEEE Computer and Communications Societies (INFOCOM 2003). Heusse, M., Urvoy-Keller, G., Duda, A., & Brown, T. (2010). Least attained recent service for packet scheduling over wireless lans,. WoWMoM’10, Montreal, QC, Canada. Jacobson, V. (1988). Congestion avoidance and control. SIGCOMM ’88 Symposium proceedings on Communications architectures and protocols. Keller, G., & Beylot, A. (2008). Improving flow level fairness and interactivity in wlans using size-based scheduling policies. Proceedings of the 11th international symposium on Modeling, analysis and simulation of wireless and mobile system. Lakshman, T., & Madhow, U. (1997). The performance of tcp/ip for networks with high bandwidth-delay products and random loss. IEEE/ACM Trans. Net., vol. 5, no. 3. Lefevre, F., & Vivier, G. (2000). Understanding tcps behavior over wireless links. Proc. Commun. and Vehic. Tech., 2000 SCVT-200. Lopez, D. (2008). Proposition for a robust and inter-operable explicit control protocol on heterogeneous high speed networks (Doctoral dissertation, University de Lyon, France).

68

Unknown Journal. Mascolo, S., Casetti, C., Gerla, M., Sanadidi, M., & Wang, R. (2001). Tcp westwood: bandwidth estimation for enhanced transport over wireless links. MOBICOM 01, pp. 287297, Rome, Italy. Nuyens, M., & Wierman, A. (2008). The foreground-background queue: a survey. Journal Performance Evaluation. Postel, J. (1981). Transmission control protocol. IETF RFC 793. Rai, I. A., Biersack, E. W., & Urvoy-Keller, G. (2004). Size-based scheduling to improve the performance of short tcp flows. IEEE Network. Stevens, W. (1997). Tcp slow start, congestion avoidance, fast retransmit. RFC 2001. Sundararajan, J., Shah, D., Medard, M., Mitzenmacher, M., & Barros, J. (2009.). Network coding meets tcp. in the Proc. of INFOCOM, Rio de Janeiro, Brazil,. Tian, Y., Xu, K., & Ansari, N. (2005). Tcp in wireless environments: Problems and solutions. by IEEE Communications Magazine. Yun, J.-H. (2009). Cross-layer explicit link status notification to improve tcp performance in wireless networks. EURASIP Journal on Wireless Communications and Networking.

69

APPENDIX A Difference Approach for Inter Session Coding We see that intra session coding has better performance than inter session coding(See chapter 6). Therefore, we tried a different approach for inter session coding to check the performance. Following sections contain the simulation results for each case.

Symmetric Channel Condition Case without MAC Acknowledgments

14 Round robin Coding Round robin (Intra) Coding Round robin (Inter) 13

Mean completion Time(log(s))

12

11

10

9

8

7

6

10

20

30

40

50 File Size

60

70

80

90

100

Figure A.1: Mean completion time for inter and intra session coding for symmetric

channels without MAC ACK

70

Asymmetric Channel Condition Case without MAC Acknowledgments

14 Round robin Coding Round robin (Intra) Coding Round robin (Inter) 13

Mean completion Time(log(s))

12

11

10

9

8

7

6

10

20

30

40

50 File Size

60

70

80

90

100

Figure A.2: Mean completion time for inter and intra session coding for asymmetric

channels without MAC ACK

71

Symmetric Channel Condition Case with MAC Acknowledgments

12

Round robin Coding Round robin (Intra) Coding Round robin (Inter) 11

Mean completion Time(log(s))

10

9

8

7

6

10

20

30

40

50 File Size

60

70

80

90

100

Figure A.3: Mean completion time for inter and intra session coding for symmetric

channels with MAC ACK

72

Asymmetric Channel Condition Case with MAC Acknowledgments

13

Round robin Coding Round robin (Intra) Coding Round robin (Inter) 12

Mean completion Time(log(s))

11

10

9

8

7

6

10

20

30

40

50 File Size

60

70

80

90

100

Figure A.4: Mean completion time for inter and intra session coding for symmetric

channels with MAC ACK

73