Comparison of Analytical and Measured Performance Results on Network Coding in IEEE 802.11 Ad-Hoc Networks Fang Zhao Singapore-MIT Alliance for Research and Technology, Singapore Email:fang.zhao@smart.mit.edu Muriel Médard Department of Electrical Engineering and Research Laboratory of Electronics, MIT Email:medard@mit.edu Martin Hundebøll, Jeppe Ledet-Pedersen, Stephan A. Rein, Frank H.P. Fitzek Aalborg University, Department of Electronic Systems, Mobile Device Group Email: jeppe@ledets.dk, {mhu, sr, ff}@es.aau.dk Abstract Network coding is a promising technology that has been shown to improve throughput in wireless mesh networks. In this paper, we compare the analytical and experimental performance of COPE-style network coding in IEEE 802.11 ad-hoc networks. In the experiments, we use a lightweight scheme called CATWOMAN that can run on standard WiFi hardware. We present an analytical model to evaluate the performance of COPE in simple networks, and our results show the excellent predictive quality of this model. By closely examining the performance in two simple topologies, we observe that the coding gain results from the interaction between network coding and the MAC protocol, and the gap between the theoretical and practical gains is due to the different channel qualities of sending nodes. This understanding is helpful for design of larger mesh networks that use network coding. I. INTRODUCTION Since its introduction by Ahlswede et al. in 2000 [1], network coding has generated much research interest and there have been attempts to apply it to a wide range of networks and applications. Many papers focus on construction of linear or random linear network codes (RLNC), for example, [2], [3], [4], [5], [6], [7]. There also exist works that build simulative setups or illustrate by example the benefits of network coding, e.g. for p2p networks as in [8], [9], [10] and for ad-hoc networks as in [11], [12], [13]. Recently, there have been proposed implementations for coding and decoding algorithms [14], [15], [16] and practical setups for media distribution on current hardware [17], [18]. To apply network coding to wireless mesh networks, Katti et al. [19] introduced a practical and efficient system named COPE, in which packets are XORed together when coding opportunities are found. Experiments were conducted using Linux PCs, and the results show that COPE largely increases network throughput, although it is not optimized for energy consumption. Zhao and Médard gave a theoretical analysis of the COPE performance in [20]. Seferoglu et al. [21] analyzed the performance of TCP over COPE-style wireless networks. Recently, Cloud et al. [22] developed a simple network model that can be used to evaluate the performance of a COPE system. In order to make network coding more readily applicable to real mesh networks, we started a project called CATWOMAN (Coding Applied To Wireless On Mobile Ad-hoc Networks) at Aalborg University. This project is based on an existing routing scheme called BATMAN (Better Approach To Mobile Adhoc Networking), and in a manner that is similar to COPE, it uses XOR network coding. By utilizing the routing information and messages of the BATMAN protocol, network coding can be readily applied on top of an existing ad-hoc protocol. Also, it is a lightweight implementation that can run on standard WiFi hardware. In this paper, we compare the theoretical performance of network coding in mesh networks with the experimental performance obtained using the CATWOMAN scheme and UDP flows. We observe that while the experimental results follow the shape of the theoretical curve nicely, the real coding gain is lower than expected. By focusing on two basic topologies, i.e., Alice and Bob and Crossed Alice and Bob, we are able to gain a good understanding of where the particular gain comes from, and also what causes the gap between the theoretical predictions and practical performance. This knowledge is essential for designing and analyzing large practical mesh networks that use network coding. The remaining of this paper is organized as follows. In Section II we describe the network coding testbed that serves for the experimentation. In Section III and IV, we compare the theoretical and experimental performance of the topologies Alice and Bob and Crossed Alice and Bob, respectively. And finally, we conclude in Section V. II. NETWORK CODING TESTBED In this section we give a brief description of the CAT- WOMAN network coding implementation [23] for ad-hoc networks, and the testbed which we used to conduct the experimental analysis. The implementation uses a new scheme that 978-1-4673-1892-1/12/$31.00 2012 IEEE 43
utilizes routing information to discover coding opportunities and the so called promiscuous mode to receive packets. The routing information is obtained via the Originator Messages (OGM), which are periodically sent out by each node to all other nodes in the network. An OGM message contains the address of the OGM originator node and the address of the previous sender. A receiver of an OGM message can thus learn that the originator node is reachable, and its next hop towards the originator. For detection of a coding opportunity, overhearing between neighbor nodes is discovered by utilizing a Time To Live (TTL) field in the originator messages, which is reduced by one each time it is rebroadcasted by a node. If a relay receives two OGM messages with the same originator from two neighbor nodes, and the TTL difference between the two messages is only one, it can conclude that the two neighbor nodes can overhear each other. The relay then updates its list of available packets for each destination node (due to overhearing or being originator of a packet). In the Alice and Bob example, the packets A from Alice and B from Bob are combined, because the packet A is available at destination node Alice, and the packet B at destination node Bob. Broadcast of a coded packet to multiple nodes is achieved via an 802.11 unicast transmission to a selected destination node, a special packet header format that indicates all the individual destinations. For each node, we enabled promiscuous mode, which allows it to receive any packet (and to forward or discard it upon inspection of the multicast header). The unicast destination node is selected using a link quality estimator derived from the OGM messages, and the weaker link is preferred to favor reliability over throughput. Note that for the unicast link, retransmissions are enabled. The network coding testbed consists of five Open-Mesh OM1P routers, which use the Atheros AR2315 Wireless System-on-a-Chip. The routers are programmed with the open source firmware OpenWRT version 10.03.1-RC5 which is extended with the network coding schemes. The nodes are configured to use the IEEE 802.11 RTS/CTS protocol, a fixed speed of 11 Mbit/s (rate adaptation disabled), and to transmit with a power of 10 dbm. The nodes are placed in a large atrium hall in a University building as illustrated in Figure 1. Bob, Alice, and the relay are placed on the ground floor, and Dave and Charlie on the third floor. Traffic between the nodes is generated by separate Linux Laptops that are connected to each of the nodes. The Linux tool iperf is used to generate traffic with equally spaced 1498 byte UDP packets for 30 seconds at different data rates. The throughput is calculated as the product of the target data rate and the percentage of received packets, e.g., if 90% of the packets have been received and the target data rate is 1 Mbit/s, the calculated throughput is 0.9 Mbit/s. III. COMPARISON OF ALICE AND BOB The Alice and Bob scenario is depicted in Figure 2. Alice and Bob are not able to exchange packets directly and need the help of a relay to forward their packets. In a pure relaying Fig. 1. Testbed of five nodes for the setups Alice and Bob and Crossed Alice and Bob networks. (a) Without network coding (b) With network coding Fig. 2. Exchange of two packets in the Alice and Bob topology with and without network coding. In the transmission schedule diagram, S stands for Send, R for Receive, and B for Broadcast. scenario, the relay would need to forward two packets to Alice and Bob, and we need a total of four transmissions to exchange two packets. Using network coding, the relay XORs two packets from Alice and Bob into one, and broadcasts this coded packet. By doing so, the network coding approach would just need three transmissions instead of four for the exchange. This example can be found in many publications, where a possible performance gain due to network coding of 25% is identified, as one packet out of four is saved. As we will demonstrate in this paper (also shown in [19]) the performance gain is even larger. A. Theoretical Analysis As argued in [20], without network coding, the relay has to send the same number of packets as both Alice and Bob combined. The throughput rises linearly with the offered load until the load equals half of the channel capacity. At that point, Alice and Bob each requires 1/4 of the capacity, and the 44
relay requires half of the capacity. From then on, the relay requires more than half of the bandwidth, and the throughput is bounded by the number of packets the relay can forward: BW R = 1 (BW A + BW B ), where BW A, BW B, and BW R are the bandwidths allocated to Alice, Bob, and the relay, respectively. As the network becomes more and more congested, the total throughput drops, until the relay is only allocated with one third of the channel capacity, and Alice and Bob induce a combined load of 2/3. When the offered load increases beyond that point, all three nodes are always backlogged, and as the MAC protocol enforces fairness among the three nodes, the relay nodes would get a constant 1/3 of the capacity. Therefore, the total throughput remains constant at 1/3. at the case where Bob sends at least as many packets as Alice (0 x 0.5). Without network coding, N packets are sent by the relay, and with network coding N x+n((1 x) x), where x represents the proportion of coded packets, and (1 x) x the proportion of not coded packets, resulting in N g C = (1) N x + N((1 x) x) = 1, 0 x 0.5. (2) 1 x If Alice sends more packets than Bob (0.5 <x 1), the number of packets sent in case of network coding is given by N(1 x) +N(x (1 x)), where (1 x) gives the proportion of coded packets and (x (1 x)) the one of not coded packets, resulting in g C = N (3) N(1 x)+n(x (1 x)) = 1, 0.5 <x 1. (4) x Fig. 4. Coding gain as a function of link share for Alice. The coding gain decreases as link share becomes unequal. Fig. 3. Expected throughput for offered load in Alice and Bob topology. Network coding should push the point of congestion and level out. Without network coding, the throughput drops when congestion occurs. When network coding is enabled, each coded packet sent by the relay delivers two packets, one to Alice and one to Bob. Thus, the relay just needs to send half the total number of received packets. In this case, the throughput linearly rises until the relay is allocated one third of the channel capacity, and Alice and Bob are given 1/3 each. The coding gain stays constant at 2 from then on, because the MAC fairness makes sure that the relay keeps one third of the capacity. In case of unequal loads of Alice and Bob, the gain would be determined by the minimum flow, as only these packets can be coded. Figure 3 shows the theoretical coding gain in the Alice and Bob scenario. The above analysis is based on the assumption that the offered load and channel condition for Alice and Bob are symmetrical. When this is not the case, in Figure 4, we illustrate the coding gain for the Alice and Bob scenario as a function of Alice s share of the 802.11 link. Let g C denote the coding gain, given as the number of packets N the relay would send without network coding divided by the number of packets sent with network coding. If x represents the link share of Alice, the link share of Bob is given as 1 x. We first look B. Experimental Results In Figure 5 the aggregated throughput for Alice and Bob is given. For our testbed we measured a WiFi capacity of 5.2 Mbit/s. Without network coding, the maximum throughput of 2.5 Mbit/s (48% of the capacity) is achieved at 2.8 Mbit/s (53.8% of the capacity), which is in line with our theoretical considerations. For network coding, the achieved throughput only goes up to 3 Mbit/s, which is 57.7% of the capacity, while we expected 5.2 2/3 = 3.47 Mbit/s. For the congested period, the throughput with network coding is roughly 2.7 Mbit/s, while without it is only 1.7 Mbit/s resulting in a gain of 2.7/1.7 =1.6. While we can see from Figures 6 and 7, that the throughput is similar for both Alice (1.4 Mbit/s corresponding to 27% of the capacity) and Bob (1.35 Mbit/s corresponding to 26% of the capacity), the link behavior is yet asymmetric: Figure 8 gives the ratio of coded versus forwarded packets at the relay over the entire range of offered loads. Owing to the asymmetric links, some packets may arrive delayed at the relay, thus missing coding opportunities due to the limited holding time (set to 10 ms). Nevertheless, the simple model shown in Figure 3 and the performance seen in Figures 5 to 7 show excellent concordance, despite the fact that we do not take into account in the 45
Fig. 5. Measured aggregated throughput for total offered load in Alice and Bob topology. The coding gain is seen after the network becomes congested. Fig. 7. Measured throughput vs. individual load for Bob. The errors bars show the 95% confidence interval. Fig. 6. Measured throughput vs. individual load for Alice. The error bars show the 95% confidence interval. theoretical model issues such as lost coding opportunities due to delay. IV. COMPARISON OF CROSSED ALICE AND BOB The second example is denoted as the Crossed Alice and Bob topology, see Figure 9. It consists of two bidirectional flows, one between Alice and Dave and the other between Bob and Charlie. All flows again go through the relay node R, and we assume that Alice and Charlie do not overhear each other s transmissions, and neither do Bob and Dave. A. Theoretical Analysis In Figure 10 we illustrate the analytical coding gain for the Crossed Alice and Bob scenario. Without network coding, the relay sends the same number of packets as the nodes combined, and the maximum throughput is achieved when the Fig. 8. Number of forwarded and coded packets vs. throughput for Alice and Bob. The numbers have been normalized such that 1.0 is the number of packets transmitted if coding is was not used. relay and the combined sending nodes each require half of the channel capacity (similar to the Alice and Bob scenario). When the load is further increased, the throughput decreases with the bandwidth allocated to the relay: BW R = 1 (BW A + BW B + BW C + BW D ). The saturation throughput is reached when the relay is allocated with 1/5 of the total bandwidth, and the four other nodes share the remaining 4/5 of the capacity. The throughput stays constant from then on owing to MAC fairness. With network coding, the throughput first increases linearly as in the Alice and Bob scenario, until it achieves a maximum of 2/3 of the capacity when the total offered load is 2/3. From now on the network becomes congested. The throughput however does not stay constant (as in the Alice and Bob scenario) but linearly decreases as the offered load increases 46
(a) Without network coding until the relay gets a share of 1/5 of the capacity at a load of 4/5. The throughput then stays constant at 2/5 due to the MAC fairness, which results in a coding gain of 2. B. Experimental Results The experimental results for the Crossed Alice and Bob are given in Figure 11. Without network coding, the throughput peaks to 2.75 Mbit/s (relating to 2.75/5.2 = 53% of the capacity), while it peaks with network coding to 3.5 Mbit/s (relating to 3.5/5.2 = 67% of the capacity), which is in line with the analysis. Also the timing of the two peaks (at 2.75 Mbit/s for not using coding and at 3.55 Mbit/s for using coding, according to 2.75/5.2 = 53% and 3.55/5.2 = 68%, respectively, is as expected by the analysis. Unlike as pre- (b) With network coding Fig. 9. Exchange of two packets between nodes A and D, and two packets between B and C, in a Crossed Alice and Bob network with and without network coding. In the transmission schedule diagram, S stands for Send, R for Receive, and B for Broadcast. Fig. 10. topology. Expected throughput for offered load in Crossed Alice and Bob Fig. 11. Measured aggregated throughput for total offered load in Crossed Alice and Bob topology. dicted, the throughputs (for using / not using coding) both decrease until the minima are reached, given as 2 Mbit/s (2/5.2 = 38% capacity) and 1.5 Mbit/s (1.5/5.2 = 29%), respectively, which is in case of network coding close to the expectation. The coding gain yet peaks only at 1.6 and stabilizes to 1.4, which is illustrated in Figure 12. Again, similarly as in the Alice and Bob scenario, the mistiming of arriving packets, due to unequal link share, reduces some of the coding opportunities. V. CONCLUSION In this paper we compared the analytical and measured performance results of network coding in two basic meshed network topologies. The measured results are obtained on an IEEE 802.11 testbed implemented on commercial wireless access points. The objective was to compare pure relaying schemes with network coding schemes. The analytical and the measured performance values match pretty well in their basic behavior. However, for high load scenarios, the IEEE802.11 hardware platform is causing some remarkable side effects such that the overall gain, estimated by our analytical results, is reduced. For example, in the simple Alice and Bob scenario, 47
Fig. 12. Number of forwarded and coded packets vs. throughput for Crossed Alice and Bob. The numbers have been normalized so that 1.0 is the number of packets transmitted if coding is was not used. the system throughput was expected to double, but in our measurements, we only saw a gain of 60%. This reduction is mainly due to the asymmetry of the links, which were assumed to be perfectly symmetric for the analytical case. Furthermore, from our previous measurements of WiFi enabled communication devices, we know that each WiFi node generally has different performance [24]. Also, there might be room for improvement in the implementation itself, which we will look into in our future work. Nevertheless the reported gains in the measurement campaigns are significant, and the understanding we gained through the comparison and analysis will help in designing larger network coded systems in the future. ACKNOWLEDGMENT This work was supported by the Danish Green Mobile Clouds project (project ref. no. 10-081621/FTP) funded by the Danish Council for Independent Research (Sapere Aude programme), the CONE project funded by the Danish Agency for Science, Technology and Innovation (grant no. 09-066549/FTP), and by the National Research Foundation (NRF) of Singapore through the Singapore-MIT Alliance for Research and Technology (SMART) Center for Environmental Sensing and Modeling REFERENCES [1] R. Ahlswede, N. Cai, S.-Y. Li, and R. Yeung, Network information flow, in IEEE Transactions on Information Theory, vol. 46, no. 4, July 2000, pp. 1204 1216. [2] R. Koetter and M. Médard, An algebraic approach to network coding, in IEEE/ACM Transactions on Networking, vol. 11, no. 5, Oct. 2003, pp. 782 795. [3] S.-Y. Li, R. Yeung, and N. Cai, Linear network coding, vol. 49, no. 2, pp. 371 381, Feb. 2003. [4] S.-Y. Li, Q. Sun, and Z. Shao, Linear network coding: Theory and algorithms, in Proceedings of the IEEE, vol. 99, no. 3, March 2011, pp. 372 387. [5] M. Médard, M. Effros, T. Ho, and D. Karger, On coding for nonmulticast networks, in Proc. of Allerton Conf. Commun., 2003. [6] D. Traskov, N. Ratnakr, D. Lun, R. Koetter, and M. Médard, Network coding for multiple unicasts: An approach based on linear optimization, in Proc. of the IEEE International Symposium on Information Theory (ISIT 06), July, pp. 1758 1762. [7] T. Ho, R. Koetter, M. Médard, D. R. Karger, and M. Effros, The benefits of coding over routing in a randomized setting, in Proc. of the IEEE International Symposium on Information Theory (ISIT 04), June 2004. [8] Z. Zhang, R. Hou, H. Chen, J. Zhou, and J. Li, Network coding based live peer-to-peer streaming towards minimizing buffering delay, in Proc. of the International Conference on Computer Application and System Modeling (ICCASM 10), vol. 4, oct. 2010, pp. V4 136 V4 140. [9] H. Zeng, J. Huang, S. Tao, and W. Cheng, A simulation study on network coding parameters in p2p content distribution system, in Proc. of the International Conference on Communications and Networking in China (ChinaCom 08), Aug. 2008, pp. 197 201. [10] J. Heide and L. Militano, Introduction to network coding for mobile peer to peer (p2p), in Mobile P2P: A Tutorial Guide, F. H. Fitzek and H. Charaf, Eds. John Wiley & Sons, 2009, pp. 143 159. [11] S. Tarapiah, C. Casetti, and C.-F. Chiasserini, Network coding in ad hoc networks: A realistic simulation study, in Proc. of the IEEE INFOCOM Workshops 2009, April 2009, pp. 1 2. [12] C. Campolo, C. Casetti, C.-F. Chiasserini, and S. Tarapiah, Performance of network coding for ad hoc networks in realistic simulation scenarios, in Proc. of the International Conference on Telecommunications (ICT 09), May 2009, pp. 31 36. [13] J. Meng and X. Pan, The optimization study of network coding for coding-aware wireless mesh networks, in Proc. of the International Conference on Future Computer and Communication (ICFCC 10), vol. 2, May 2010, pp. V2 537 V2 540. [14] J. Heide, M. Pedersen, F. Fitzek, and M. Médard, On code parameters and coding vector representation for practical rlnc, in Proc. of the IEEE International Conference on Communications (ICC 11), june 2011, pp. 1 5. [15] J. Heide, M. V. Pedersen, and F. Fitzek, Decoding algorithms for random linear network codes, in Proc. of the Int. Conf. on Networking - Workshop on Network Coding Applications and Protocols (NC-Pro 11), May 2011. [16] M. Pedersen, J. Heide, and F. H. Fitzek, Kodo: An open and research oriented network coding library, in Proc. of the Int. Conf. on Networking - Workshop on Network Coding Applications and Protocols (NC- Pro 11), May 2011. [17] P. Vingelmann, F. Fitzek, M. Pedersen, J. Heide, and H. Charaf, Synchronized multimedia streaming on the iphone platform with network coding, in IEEE Communications Magazine, vol. 49, no. 6, june 2011. [18] M. V. Pedersen, J. Heide, F. H. P. Fitzek, and T. Larsen, A mobile application prototype using network coding, in European Transactions on Telecommunications, vol. 21, no. 8, December 2010, pp. 738 749. [19] S. Katti, H. Rahul, W. Hu, D. Katabi, M. Médard, and J. Crowcroft, Xors in the air: practical wireless network coding, in ACM SIGCOMM Comput. Commun. Rev., vol. 36, no. 4, August 2006. [20] F. Zhao and M. Médard, On analyzing and improving cope performance, in Proc. of Information Theory and Applications Workshop (ITA), 2010. [21] H. Seferoglu and A. Markopoulou, Network coding aware queue management for unicast flows over coded wireless networks, in Proc. of the IEEE International Symposium on Network Coding (NetCod 10), June 2010, pp. 1 6. [22] J. Cloud, L. Zeger, and M. Médard, Effects of mac approaches on non-monotonic saturation with cope - a simple case study, in Proc. of the Military Communications Conference (MILCOM 11), Nov. 2011, pp. 747 753. [23] M. Hundebøll et al., CATWOMAN: Implementation and evaluation of IEEE 802.11 based multi-hop networks using network coding, in Proc. of the IEEE 76th Vehicular Technology Conference (VTC 12-Fall), Sept. 2012. [24] M. Petersen, G. Perrucci, and F. Fitzek, Energy and Link Measurements for Mobile Phones using IEEE802.11b/g, in The 4th International Workshop on Wireless Network Measurements (WiNMEE 08) - in conjunction with WiOpt 08, Berlin, Germany, Mar. 2008. 48