Latency and Backlog Bounds in Time- Sensitive Networking with Credit Based Shapers and Asynchronous Traffic Shaping Ehsan Mohammadpour, Eleni Stai, Maaz Mohuiddin, Jean-Yves Le Boudec September 7 th 2018, International Teletraffic Congress (ITC 30), International workshop on Network Calculus, Vienna
Time Sensitive Networking(TSN) Time Sensitive Networking (TSN): An IEEE standard of the 802.1 Working Group defining mechanisms for: bounded end-to-end latency zero packet loss Hardness of end-to-end delay calculation in TSN with per-class queuing Burstiness cascade caused by per-class queuing Dependency loop issue Reshaping at every node 2
Reshaping solution Interleaved regulator: Called Asynchronous Traffic Shaping (P802.1Qcr) in the context of IEEE TSN. An interleaved regulator reshapes individual flows, while doing aggregate queuing and not per-flow queuing. Addition of interleaved regulator makes the calculation of end-to-end latency tractable; as in every node, each flow can be treated as a fresh one. 3
System Model - Architecture of considered TSN Node Contention occurs only at the output port Input ports and switching fabrics are modeled as variable delays with known bounds We focus on classes A and B which queues are using CBS and ATS All classes are non-preemptive CDT A B BE0 Interleaved regulators Class-Based FIFO System TSN output port Transmission Selection (strict priority) Highest to lowest priority 4
System Model - Interleaved Regulation Interleaved Regulation Aggregate queuing, per-flow regulation Queuing policy two flows share the same queue if: Going to the same output port, and Having the same class, and Coming from the same input port. Type of Regulation + Length Rate Quotient (LRQ) &' ( - Output Port!"# % $ BE!"# % $ BE &' ) - Output Port &' * -Output Port!"# % $ BE!"# % $ BE + Leaky Bucket (LB) 5
System Model - Type of Regulation LRQ (!) LB (!, D) " # : arrival time of packet $ % # : eligibility time of packet $ & ' : length of packet (, & ' * It is a shaper with shaping curve!e + D.! % # = max " #, % #01 + & #01! F D It is a case of g-regularity [Chang and Lin, 1998]: & ' : length of packet (, & ' D & ' 4 < 6: 8 6 8 4 + :(< 4 + + < 60> ) If & ' F: packet ( is eligible, F = & ' Where for LRQ, @ A = B. C F is increasing with rate! (F D) 6
System Model - Credit Based Shaper (CBS) Keeps a separate credit counter for class A and B Packets can be transmitted, if credit 0: Subject to priority, where class A is prior to B Credit modification: Decreases in packet transmission (" # ) Increases when: no transmission and backlog 0 (" % ) Credit < 0 Freezes in CDT transmission (" & ) Resets when backlog becomes zero and Credit 0 (" ' ) Credit of A Credit of B Packet Arrival Packet transmission " # " % " & " ' ( ) * ) * + A B A CDT A B CDT A ( + " " " " 7
Assumptions Each flow has its own regulation policy (LRQ or LB) The regulation policy for each flow is the same at all hops Flows are regulated at the source nodes Control Data Traffic (CDT) has known affine arrival curve at every hop 8
Contributions A service curve offered to an AVB class at a CBFS Bound on the response time at a CBFS for AVB flows Bound on the response time of an interleaved regulator A bound on the end-to-end delay for AVB flows Backlog bounds on a TSN node 9
Service curve property for classes A and B at a CBFS Ø An extension of minimal service curve computed in [De Azua and Boyer, 2014] Theorem 1-A: A rate-latency service curve offered to class A by CBFS, assuming CDT has an affine arrival curve (r,b), is:! " = $ %&' ( )* " +, + ' )- % ) / " = 0" 1 3 0 " 4 " Theorem 1-B: A rate-latency service curve offered to class B by CBFS, assuming CDT has an affine arrival curve (r,b), is:! 5 = $ %&' (*56 + * " ) - ; < ; = ; +, + ' )- % ) 1 = line rate * " = max. pkt. Len. of A * 5 = max. pkt. Len. of B * 56 = max. pkt. Len. of BE 0 " = CBS Idle slope (A) 4 " = CBS send slope (A) 0 5 = CBS Idle slope (B) 4 5 = CBS send slope (B) )* " = max * 5, * 56 / 5 = 05 1 3 )* = max * ", * 5, * 56 0 5 4 5 10
Novel Bound on Response time of CBFS for classes A and B Theorem 2: An upper bound on the response time of CBFS for flow! of class " is: Where: #!, " = & ' + )*+*,' -. / 0 + -. 1 + &234,536 -. = 7. (9:;<9=9 >:1?@A B@CDAh F!!BFG!), if flow is LRQ-regulated, -. = I. (9<C<9=9 >:1?@A B@CDAh F!!BFG!), if flow is LB-regulated. Similar formula is obtained for class X. 1 = line rate (& ', / ' ) = CBFS service curve params of class ; ) *+*,' = J. K L. MNOPP ' & +Q* = & *43R + & 234 ). K switch < output port switch W output port & 234 [& 234,5UR, & 234,536 ] Interleaved Regulagor CBFS #(!, ;) & +Q* Interleaved Regulagor CBFS 11
Comparison with Classical Network Calculus results From classical network calculus results, an upper bound on CBFS response time of class! is: " #! = % & + ()*),, -, + %./0,1/2 FIFO system Shaped input flows Known service curve " 3, < = % & + =>?>,& 6 7 @ & + 6 7 A + %./0,1/2 This work offers better bound (" 3,! " #! ): " #! " 3,! = 6 7 8-8 9 Made possible by: + max-plus representation of regulator + Known packet transmission time This work offers per-flow bound, while classical NC does not. 0 June 2018 12
Bound on Response time of CBFS- pair for classes A and B Ø Interleaved regulator comes for free [Le Boudec, 2018][Specht and Samii, 2016]; thus: Corollary 1: An upper bound on the response time of the combination of a CBFS- of class! is: "! = sup ' ( * = 0 8 + 9:3:,8 ; 8 + sup ' ( * +, -,! + 0 1234,567 Similar formula is obtained for class U. switch W output port Interleaved Regulagor CBFS < ' ( = < '( ; 8 + 0?62,567 + 0 1234,567 0 3I: switch V output port Interleaved Regulagor CBFS = = line rate (0 8, ; 8 ) = CBFS service curve params of class A 9 :3:,8 = B ' ( C' DEFGG H 0 3I: = 0 :26J + 0?62 9 ' ( 0?62 [0?62,5LJ, 0?62,567 ] 0 1234 [0 1234,5LJ, 0 1234,567 ] < ' = N O ' O;P QRS T ' OU QRS June 2018 0 1234 13 "(!)
Bound on Response time of for classes A and B Theorem 3: An upper bound on the response time of an interleaved regulator for flow! of class " is: #!, " = & " ( ) * +,-./,012 +, 3/45,012 Similar formula is obtained for class [. switch Z output port switch Y output port * = line rate (, 7, 8 7 ) = CBFS service curve params of class A : ;4;,< = = ) >?) @ABCC D : ) > ( ) : Min. packet length, 4T; =, ;/.2 +, -./, -./ [, -./,012,, -./,0.W ] Interleaved Regulagor CBFS, 4T; Interleaved Regulagor CBFS, 3/45 [, 3/45,012,, 3/45,0.W ] #(!, "), 3/45 &(") June 2018 14
Bound on End-to-end delay for classes A and B Corollary 2: An upper bound on the end-to-end delay of a flow! of class ", is: *+, #!, " = & '() - ','.) " + 0 *+)!, " Similar formula is obtained for class 6.! 1 2 3 4 k-1 k R F R F R F R F R F R: Regulator F: CBFS - ),, (") -,,3 (") - 3,4 (") - 4,5 (") - *+,,*+) (") 0 *+) (!, ") June 2018 15
Backlog bound- CBFS for class A and B Ø Bound on number of bits in the CBFS Ø Regulated input flows to the CBFS Ø Known rate-latency service curve (R,T)! " # = % & # + ( & CDT A B BE Backlog bound CBFS for class A: " ) *+,- =. ( & + 4 ". % & & /& 01233 " & /& 01233 " Similar formula is obtained for class ). June 2018 16
Backlog bound- Interleaved Regulator of class A and B Ø Bound on number of bits in the interleaved regulator Ø Output arrival curve of previous hop Ø Arrival curve enforced by line rate Ø Service curve from known latency bound (: ; < ) Backlog bound of interleaved regulator of class A:! "# $ = min )* $ + sup / 1 Similar formula is obtained for class!. min = "# 2 /, 4 5 * $ + 6 5 + 4 5 7 $ + 6 8 9 $ CDT A B BE ) = line rate (7 $, 9 $ ) = CBFS service curve params of class A * $ = delay bound on 2 / : Max. packet length (4 5, 6 5 )= affine arrival curve params of the flows using considered, sharing the same CBFS in previous hop 6 8 = total burstiness of flows not using the same, sharing the same CBFS in previous hop 17
Case study 1 - Network setup and flows On each output port: CBFS classes: CDT, A, BE Line rate: 100 #$%& CDT traffic with affine arrival curve ' = 20 #$%&, $ = 4,$ Best Effort traffic with maximum packet length 2,$ CBS parameters: -. = 50 #$%&, 0. = 50 #$%& 1 8 5 8 7 2 5 2 7 2 4 8 4 2 5 3 4 8 6 8 3 2 6 2 3 Flow LRQ-regulated Rate (9:;<) Packet len. (=:) 8 5 20 1 8 7 20 2 8 6 20 2 8 3 20 2 8 4 20 2 June 2018 18
Case study 1 Numerical results on end-to-end delay bound We can calculate end-to-end delay bound for any link utilization 1 This is not correct for other techniques without regulation End-to-end delay bound of flow " # of class A: $ " #, & = 700 *+ " / LRQ-regulated 1, 0 2 3, / Flow Rate (1234) Packet len. (52) " # " 0 " # 20 1, #,. ". 5 4 " -, - " 0 20 2 " / 20 2 Network with dependency loop " - 20 2 ". 20 2 19
Case study 1 Numerical results on response times Adversarial simulation is done by trial and error The numerical results show clues on tightness of the bounds Proving the tightness is still an ongoing project Bound on Simulation Theoretical CBFS response time of! " 140 &' ( ) ", + = 140 &' response time at 1 130 &'! ) ", + = 130 &' CBFS- response time (! " 1) 140 &' 0 12," + = 140 &' 20
Case study 2- E2E delay tightness; Comparing with sum of per-node delay bound The numerical results show clues on tightness of the bounds Theoretical:! " #, % = 700 )* Simulation: 700 )* Proving the tightness is still an ongoing project 2 # 2 C 2 D 2 F 2 G " " C " D " F " E G 1 2 3 4 " # 2 E Sum of per-node delay bound Our E2E delay bound Bound on delay of node,: -. / 0,1 = 2 "#, % + 4 " #, % / - 0,1 50 = 0 + 140 = 140 )* -. / 0,1 = 130 + 140 = 270 )* (, = 1,2,3,4)! <= " #, % =. <@AB -. / 0,1 = 1220 )* Flow LRQ-regulated Rate (HIJK) Packet len. (LI) " # 20 1 " C 20 2 " D 20 2 " F 20 2! <= " #, % = 1220 )* 700 )* =! " #, % " G 20 2 " E 20 2 June 2018 21
Conclusion We obtain a service curve offered to AVB classes Novel upper bound on response time of CBFS for AVB flows The bound is better than classical network calculus results Upper bound on response time of interleaved regulator for each flow Upper bound on per-flow end-to-end delay The bound is better than sum of per-node delay bound Backlog bounds in a TSN node E-Mail: ehsan.mohammadpour@epfl.ch 22
References [1] E. Mohammadpour, E. Stai, M. Mohiuddin, and J.-Y. Le Boudec, End-to-end Latency and Backlog Bounds in Time-Sensitive Networking with Credit Based Shapers and Asynchronous Traffic Shaping, arxiv:1804.10608 [cs.ni], 2018. [Online]. Available: https: //arxiv.org/abs/1804.10608/ [2] J.-Y. Le Boudec, A Theory of Traffic Regulators for Deterministic Networks with Application to Interleaved Regu- lators, arxiv:1801.08477 [cs], Jan. 2018. [Online]. Available: http://arxiv.org/abs/1801.08477/, (Accessed:09/02/2018). [3] J. Specht and S. Samii, Urgency-Based Scheduler for Time-Sensitive Switched Ethernet Networks, in the 28th Euromicro Conference on Real-Time Systems (ECRTS), Jul. 2016, pp. 75 85. [4] J. A. R. De Azua and M. Boyer, Complete modelling of avb in network calculus framework, in the 22nd ACM Int l Conf. on Real- Time Networks and Systems (RTNS), NY, USA, 2014, pp. 55 64. 23