TCP over low-power and lossy networks: tuning the segment size to minimize energy consumption

1,236 views
1,125 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,236
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
21
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

TCP over low-power and lossy networks: tuning the segment size to minimize energy consumption

  1. 1. TCP over low-power and lossy networks: tuning the segment size to minimize energy consumption Ahmed Ayadi, Patrick Maill´, David Ros e IT/TELECOM Bretagne Rennes, France 8-9 February 2011Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 1 / 22
  2. 2. Motivation The IETF Working Group 6LoWPAN has recently introduced an adaptation layer that provides header compression and fragmentation/reassembly mechanisms to allow sending/receiving IPv6 packets over LLNs (e.g., IEEE 802.15.4), The 6LoWPANs have given more chance for TCP to be deployed in the Low-power and Lossy Networks such as Wireless Sensor Networks.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 2 / 22
  3. 3. Motivation The IETF Working Group 6LoWPAN has recently introduced an adaptation layer that provides header compression and fragmentation/reassembly mechanisms to allow sending/receiving IPv6 packets over LLNs (e.g., IEEE 802.15.4), The 6LoWPANs have given more chance for TCP to be deployed in the Low-power and Lossy Networks such as Wireless Sensor Networks. However, the IPv6 MTU is 1280 bytes while an 802.15.4 frame can have a payload limited to 74 bytes, A TCP segment might end up fragmented into as many as 18 fragments at the 6LoWPAN layer, If a single one of those fragments is lost in transmission, all fragments must be resent, Sending long TCP segments increases the packet error rate, while sending short TCP segments increases the overhead.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 2 / 22
  4. 4. Outline 1 Introduction 2 TCP energy consumption model TCP energy consumption model: Notations Link layer: one-hop model Multi-hop model TCP Model 3 Results and discussion Model assessment FEC redundancy ratio and energy consumption Selecting the TCP MSS to minimize energy consumption 4 Conclusion and perspectivesAhmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 3 / 22
  5. 5. Introduction Focus on the energy cost when TCP is used in multi-hops LLNs. Present a simple mathematical model aimed at predicting the energy consumed by the wireless nodes of an LLN in a bulk-data transfer scenario. The model estimates TCP energy performance based on the bit error rate, the maximum number of retransmissions at link layer, the number of hops between the sender and the receiver, the amount of FEC, and the TCP maximum segment size. The proposed model allows us to study the tradeoffs involved in sending short versus long TCP segments. Applying the model, we study the energy efficiency of TCP over an LLN using 6LoWPAN and IEEE 802.15.4 protocols.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 4 / 22
  6. 6. Notations We assume that the energy consumed by a TCP transmission in a wireless LLN mainly corresponds to the data emission and reception, and thus directly depends on the number of bits sent by all nodes. The following table lists most of the variables used in the model. Variable Definition D Link-layer data frame size A Link-layer acknowledgement frame size h Number of hops between source and destination r Maximum number of link-layer transmission attempts m Number of fragments corresponding to a single TCP segment (due to link layer fragmentation) α FEC redundancy ratio B Bit error rateAhmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 5 / 22
  7. 7. Link Layer Modeling Automatic Repeat reQuest (ARQ) ARQ uses the cyclic redundancy check (CRC) error-detecting code that is added to the data: the receiver uses the error-detecting code number to check the integrity of the received data After receiving a correct frame, the receiver replies by an ACK. If the sender does not receive an ACK before the timeout, it re-transmits the frame/packet until the sender receives an acknowledgment or exceeds a predefined number of re-transmissions.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 6 / 22
  8. 8. Link Layer Modeling Automatic Repeat reQuest (ARQ) ARQ uses the cyclic redundancy check (CRC) error-detecting code that is added to the data: the receiver uses the error-detecting code number to check the integrity of the received data After receiving a correct frame, the receiver replies by an ACK. If the sender does not receive an ACK before the timeout, it re-transmits the frame/packet until the sender receives an acknowledgment or exceeds a predefined number of re-transmissions. Forward Error Correction (FEC) The main idea of FEC is to add redundancy to the original frame, to allow the destination node to detect and correct some bit errors. The FEC algorithm adds (α × K) redundancy bits to form a frame of length D.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 6 / 22
  9. 9. Link Layer Modeling ACKs are sent without FEC. Sender Receiver Sender Receiver Sender Receiver Data frame Data Data . frame frame Ack frame e . Ack fram (a) Failure. (b) Partial failure. (c) Success. c D Pfail = 1 − B i (1 − B)D−i , i i=0 Ppartial = (1 − Pfail )(1 − (1 − B)A ) Psucc = (1 − Pfail )(1 − B)AAhmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 7 / 22
  10. 10. Link Layer Modeling F i : Probability that a destination node does not receive a link layer data frame after r attempts (i th hop) r F = Pfail .Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 8 / 22
  11. 11. Link Layer Modeling F i : Probability that a destination node does not receive a link layer data frame after r attempts (i th hop) r F = Pfail . Hf : Expected number of bits sent after r attempts knowing that the (one-hop) transmission has failed Hf = r × D.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 8 / 22
  12. 12. Link Layer Modeling F i : Probability that a destination node does not receive a link layer data frame after r attempts (i th hop) r F = Pfail . Hf : Expected number of bits sent after r attempts knowing that the (one-hop) transmission has failed Hf = r × D. Hs : Expected number of bits sent within r attempts knowing that the (one-hop) transmission has succeeded r 1 r i r −i Hs = ( Ppartial Pfail (r D + iA) 1 − F i=1 i r k−1 k −1 i k−1−i + Psucc Ppartial Pfail (kD + (i + 1)A)) i k=1 i=0Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 8 / 22
  13. 13. Multi-hop model Sender Receiver Sender Receiver . . . . (d) End-to-end failure scenario: the (e) End-to-end success scenario: frame cannot be forwarded after r the frame arrives at the destination. unsuccessful retransmissions. This scenario may also include par- tial failures over one or more hops (not depicted). Figure: Failure and success scenarios in a multi-hop transmission.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 9 / 22
  14. 14. Multi-hop model Q s : Probability of an end-to-end packet transmission success h Qs = (1 − F i ) i=1Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 10 / 22
  15. 15. Multi-hop model Q s : Probability of an end-to-end packet transmission success h Qs = (1 − F i ) i=1 Es : Expected number of bits sent for a successful end-to-end packet transmission knowing that it has succeeded h Es = Hsi i=1Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 10 / 22
  16. 16. Multi-hop model Q s : Probability of an end-to-end packet transmission success h Qs = (1 − F i ) i=1 Es : Expected number of bits sent for a successful end-to-end packet transmission knowing that it has succeeded h Es = Hsi i=1 Ef : Expected number of bits sent for an end-to-end packet transmission knowing that it has failed h k−1 k−1 k=1 ( i=1 Hsi + Hfk ) j=1 (1 − F j )F k Ef = h 1− i=1 (1 − Fi)Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 10 / 22
  17. 17. TCP Model Ps : The success probability of a TCP segment transmission attempt is simply the probability that all m data fragments be correctly sent to the destination, and the TCP ACK be successfully sent back to the source: Ps = Q m × Q s,ack , sAhmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 11 / 22
  18. 18. TCP Model Ps : The success probability of a TCP segment transmission attempt is simply the probability that all m data fragments be correctly sent to the destination, and the TCP ACK be successfully sent back to the source: Ps = Q m × Q s,ack , s Knowing that a transmission is successful at the TCP level (i.e., the TCP ACK is correctly received by the TCP source, which implies that all m fragments correctly reached the destination), the expected total number of bits sent by all nodes equals: Ss = Es × m + Es,ackAhmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 11 / 22
  19. 19. TCP Model Knowing that a TCP transmission attempt has failed, the expected number of bits sent end-to-end by all nodes is: 1 Sf = If (1 − Q m ) s + (Es × m + Ef ,ack )Q m (1 − Q s,ack ) s , 1 − Ps end-to-end transmission failure end-to-end transmission failure of the TCP ACK of one or more of the m fragments m m If = kEf +(m−k)Es (1−Q s )k (Q s )m−k = m(1−Q s )Ef +mEs Q s (1−Q m ). s k k=1 This therefore corresponds to a total number of bits sent (per segment) of S = Sf (1/Ps − 1) + Ss .Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 12 / 22
  20. 20. Scenario & Parameters TCP Sender n-1 n n+1 TCP Receiver Figure: Chain TopologyAhmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 13 / 22
  21. 21. Scenario & Parameters TCP Sender n-1 n n+1 TCP Receiver Figure: Chain Topology Parameter Value h 5 r 3 α 0 BER B 3 × 10−4 Link-layer Ack frame size 40 bits Link-layer data frame header 120 bits IP header 160 bits TCP header 160 bitsAhmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 13 / 22
  22. 22. Model assessment (1/2) 103 MSS = 512 (model) MSS = 512 (simulation) MSS = 64 (model) Consumed energy (J) MSS = 64 (simulation) 102 101 10−6 10−5 10−4 10−3 BER Figure: Energy consumption with long or short TCP segments, as a function of the BER B.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 14 / 22
  23. 23. Model assessment (2/2) 102 MSS = 512 (simulation) MSS = 512 (model) MSS = 64 (simulation) Consumed energy (J) MSS = 64 (model) 101 2 3 4 5 6 7 Maximum link layer attempts Figure: Energy consumption with short or long TCP segments, as a function of the number of link layer attempts r (with B = 5 × 10−4 ).Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 15 / 22
  24. 24. FEC redundancy ratio and energy consumption (1/2) 103 MSS = 512, r =1 MSS = 512, r =3 MSS = 64, r =1 Consumed energy (J) MSS = 64, r =3 102 101 100 −3 10 10−2 10−1 100 Redundancy ratio (α) Figure: Consumed energy using short or long TCP segment, as a function of the redundancy ratio α (B = 3 × 10−4 , h = 5).Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 16 / 22
  25. 25. FEC redundancy ratio and energy consumption (2/2) 103 MSS = 512, B = 10−3 MSS = 512, B = 10−4 MSS = 64, B = 10−3 Consumed energy (J) 102 MSS = 64, B = 10−4 101 100 10−2 10−1 100 Redundancy ratio (α) Figure: Consumed energy using short or long TCP segment, as a function of the redundancy ratio α (r = 1, h = 5).Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 17 / 22
  26. 26. Selecting the TCP MSS to minimize energy consumption 102 MSS = 512, B = 4 × 10−4 MSS = 64, B = 4 × 10−4 Consumed energy (J) 101 100 2 4 6 8 10 Number of Hops (h) Figure: Energy consumption for short and long TCP segment sizes, as a function of the network size (r = 3).Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 18 / 22
  27. 27. Selecting the TCP MSS to minimize energy consumption Depending on the transmission distance and the BER. We remark that for a given BER, short MSSs tend to outperform long MSSs when the distance grows: it is more and more interesting to use short MSS values instead of long ones. 10−1 MSS=64 MSS=512 −2 10 BER 10−3 10−4 10−5 2 4 6 8 Number of Hops (h) Figure: Long (MSS=512 bytes) versus short (MSS=64 bytes) in a multi-hop transmission (r = 3).Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 19 / 22
  28. 28. The impact of ARQ max attempts 10−3 r =7 r =5 r =4 r =3 BER r =2 10−4 r =1 10−5 2 4 6 8 Number of Hops (h) Figure: Long (MSS=512 bytes) versus short (MSS=64 bytes) in a multi-hop TCP transmission: prefer the short MSS above the curves, the long one below.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 20 / 22
  29. 29. The effect of FEC mechanisms Not surprisingly (the FEC reducing the effect of transmission errors), redundancy makes large MSSs outperform small MSSs due to the overhead reduction they allow. 10−1 α = 10−1 10−2 α = 10−2 BER −3 10 α = 10−3 10−4 10−5 2 4 6 8 Number of Hops (h) Figure: Long (MSS=512 bytes) versus short (MSS=64 bytes) in a multi-hop TCP transmission: prefer the short MSS above the curves, the long one below.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 21 / 22
  30. 30. Conclusion and perspectives Conclusion We have proposed an analytical model to estimate the number of bits sent by all wireless nodes in a TCP session in a Low power and Lossy Network, in order to evaluate the overall energy consumption, We have shown that using a large TCP segment size is less energy-consuming in small, low-error networks, while it becomes interesting to reduce the MSS when the network is large or very lossy, Perspectives A first interesting direction would be to model the collision process, that has been observed in our simulations for large MSS values, We would also like to consider the case when duplicate frames are not detected at the link layer; likewise, the transport layer modeling could be extended to encompass TCP’s delayed acknowledgement mechanism, and also larger TCP windows, We are currently investigating an adaptation algorithm which dynamically adjusts the TCP segment size to the optimal MSS value.Ahmed Ayadi (IT/TELECOM Bretagne) NTMS Wireless Sensor Networks 2011 Paris, 8-9 February 2011 22 / 22

×