memory efficient membership encoding in switches
play

Memory-Efficient Membership Encoding in Switches Mengying Pan , - PowerPoint PPT Presentation

Memory-Efficient Membership Encoding in Switches Mengying Pan , Robert MacDavid, Shir Landau-Feibish, Jennifer Rexford 1 Policy-Based Forwarding Forward packets to achieve sophisticated policy goals. If set contains A forward to


  1. Memory-Efficient Membership Encoding in Switches Mengying Pan , Robert MacDavid, Shir Landau-Feibish, Jennifer Rexford 1

  2. Policy-Based Forwarding β€’ Forward packets to achieve sophisticated policy goals. If set contains A β†’ forward to 𝒴 Set of attributes If set contains B β†’ forward to 𝒡 = { A, D, F, … } …… 𝒴 𝒡 𝒢 2

  3. Policy-Based Forwarding β€’ A packet is tagged with a set of attributes at an edge device. β€’ A switch queries the members in the attribute set to forward. If set contains A β†’ forward to 𝒴 Set of attributes If set contains B β†’ forward to 𝒡 = { A, D, F, … } …… 𝒴 𝒡 𝒢 3

  4. Examples of membership-based forwarding Middlebox chain Attributes: middleboxes Attribute set: set of middleboxes to visit A C B S = { A, C } S 1 S 2 S 4 S 3 A ∈ S β†’ A else β†’ S 2 4

  5. Examples of membership-based forwarding Middlebox chain Attributes: middleboxes Attribute set: set of middleboxes to visit A C B S = { A, C } S 1 S 2 S 4 S 3 B ∈ S β†’ B else β†’ S 3 5

  6. Examples of membership-based forwarding Middlebox chain Attributes: middleboxes Attribute set: set of middleboxes to visit A C B S = { A, C } S 1 S 2 S 4 S 3 C ∈ S β†’ C else β†’ S 4 6

  7. Examples of membership-based forwarding Middlebox chain S = { A, C } A C B Attributes: middleboxes Attribute set: set of middleboxes to visit S 1 S 2 S 3 S 4 A ∈ S β†’ A B ∈ S β†’ B C ∈ S β†’ C Internet Exchange Point A S = { A, C } Attributes: peers Attribute set: set of peers reaching IP destination B C 7

  8. Membership encoding scheme β€’ Encoding: a set of attributes β‡’ a tag attached to the packet β€’ Querying: an attribute β‡’ one or multiple match strings a set contains an attribute ⇕ the tag matches any of the attribute’s match strings. If tag matches A’s match string #1 β†’ forward to A If set contains A β†’ forward to A β‡’ If tag matches A’s match string #2 β†’ forward to A …… 8

  9. Attribute matrix A chain of six middleboxes A-F with six classes of traffic A B C D E F Attribute set β€’ Column = attribute S 1 1 S 1 {A} β€’ Row = attribute set S 2 1 1 1 S 2 {A,B,C} β€’ Matrix width: W S 3 1 1 S 3 {B,C} H = 6 S 4 1 1 1 S 4 {C,D,E} β€’ Matrix height: H S 5 1 1 1 S 5 {C,D,F} β€’ Matrix density: D S 6 1 1 1 S 6 {D,E,F} W = 6 9

  10. Two strawman approaches: bitmap A B C D E F S 1 1 S 2 1 1 1 S 3 1 1 S 4 1 1 1 S 5 1 1 1 S 6 1 1 1 10

  11. Two strawman approaches: bitmap A B C D E F Tag S 1 1 0 0 0 0 0 S 1 A 100000 S 2 1 1 1 S 3 1 1 S 4 1 1 1 S 5 1 1 1 S 6 1 1 1 11

  12. Two strawman approaches: bitmap A B C D E F Tag S 1 1 S 1 A 100000 S 2 A B C 111000 S 2 1 1 1 0 0 0 S 3 B C 011000 S 3 1 1 S 4 C D E 001110 S 4 1 1 1 S 5 C D F 001101 S 5 1 1 1 S 6 D E F 000111 S 6 1 1 1 12

  13. Two strawman approaches: bitmap Match String A B C D E F Tag A 1***** S 1 1 S 1 A 100000 B *1**** S 2 A B C 111000 S 2 1 1 1 S 3 B C 011000 C **1*** S 3 1 1 S 4 C D E 001110 D ***1** S 4 1 1 1 S 5 C D F 001101 E ****1* S 5 1 1 1 S 6 D E F 000111 F *****1 S 6 1 1 1 β€’ Number of strings: W = 6 β€’ Long match strings! ⟹ β€’ Width of strings: W = 6 bits β€’ High memory cost! β€’ Memory cost: W 2 = 36 bits 13

  14. Two strawman approaches: flat tags A B C D E F S 1 1 S 2 1 1 1 S 3 1 1 S 4 1 1 1 S 5 1 1 1 S 6 1 1 1 14

  15. Two strawman approaches: flat tags A B C D E F Tag S 1 1 S 1 A 000 S 2 1 1 1 S 3 1 1 S 4 1 1 1 S 5 1 1 1 S 6 1 1 1 15

  16. Two strawman approaches: flat tags A B C D E F Tag S 1 1 S 1 A 000 S 2 A B C 001 S 2 1 1 1 S 3 1 1 S 4 1 1 1 S 5 1 1 1 S 6 1 1 1 16

  17. Two strawman approaches: flat tags A B C D E F Tag S 1 1 S 1 A 000 S 2 A B C 001 S 2 1 1 1 S 3 B C 010 S 3 1 1 S 4 C D E 011 S 4 1 1 1 S 5 C D F 100 S 5 1 1 1 S 6 D E F 101 S 6 1 1 1 17

  18. Two strawman approaches: flat tags Match String A B C D E F Tag A 000 S 1 1 S 1 A 000 A 001 S 2 A B C 001 S 2 1 1 1 S 3 B C 010 B 001 S 3 1 1 B 010 S 4 C D E 011 S 4 1 1 1 S 5 C D F 100 … … S 5 1 1 1 S 6 D E F 101 F 100 S 6 1 1 1 F 101 β€’ Number of strings: WHD = 15 β€’ Many strings! ⟹ β€’ Width of strings: log(H) = 3 bits β€’ High memory cost! β€’ Memory cost: WHD log(H) = 45 bits 18

  19. Goals β€’ Small memory cost of match strings β€’ Small number of match strings β€’ Short match strings (i.e. short tags) 19

  20. Why can we compress? β€’ Matrix width: W A B C D E F 2 W β€’ Matrix height: H << S 1 1 β€’ Matrix density: D < 1 % S 2 1 1 1 S 3 1 1 << 2 6 H = 6 S 4 1 1 1 S 5 1 1 1 S 6 1 1 1 W = 6 20

  21. Why can we compress? β€’ Matrix width: N A B C D E F β€’ Matrix height: M << N 2 S 1 1 Sparsity of attribute matrix β€’ Matrix density < 1 % S 2 1 1 1 Structures within attributes S 3 1 1 M = 6 S 4 1 1 1 ⇩ S 5 1 1 1 M emory E fficient M embership- E ncoding S 6 1 1 1 N = 6 21

  22. Clustering-based encoding scheme 1 1 1 Mutually exclusive clusters can be 1 encoded efficiently. 1 1 1 1 1 1 1 22

  23. Clustering-based encoding scheme A B C D E F S 1 1 S 2 1 1 1 Mutually exclusive clusters can be S 3 1 1 encoded efficiently. S 4 1 1 1 S 5 1 1 1 S 6 1 1 1 cluster ID + cluster bitmap 23

  24. Clustering-based encoding scheme Match String A B C D E F Cluster ID = 0 A 01* S 1 1 Bitmap of {A, B} B 0*1 S 2 1 1 1 S 3 1 1 S 4 1 1 1 S 5 1 1 1 S 6 1 1 1 cluster ID + cluster bitmap 24

  25. Clustering-based encoding scheme Match String A B C D E F A 01* S 1 1 B 0*1 S 2 1 1 1 S 3 1 1 D 11** S 4 1 1 1 Cluster ID = 1 E 1*1* S 5 1 1 1 Bitmap of {D, E, F} F 1**1 S 6 1 1 1 cluster ID + cluster bitmap 25

  26. Clustering-based encoding scheme Match string A B C D E F Tag A 01* S 1 1 S 1 A 010 B 0*1 S 2 A B C 011 S 2 1 1 1 S 3 B C 001 S 3 1 1 D 11** S 4 C D E 1110 S 4 1 1 1 S 5 C D F 1101 E 1*1* S 5 1 1 1 S 6 D E F 1111 F 1**1 S 6 1 1 1 cluster ID + cluster bitmap 26

  27. Clustering-based encoding scheme Match string Tag A B C D E F A 01* * S 1 A 010 0 S 1 1 B 0*1 * S 2 A B C 011 0 S 2 1 1 1 S 3 B C 001 0 S 3 1 1 D 11** S 4 C D E 1110 S 4 1 1 1 E 1*1* S 5 C D F 1101 S 5 1 1 1 F 1**1 S 6 D E F 1111 S 6 1 1 1 β€’ Number of match strings: 5 β€’ Width of match strings: 4 bits 27

  28. MEME Match String Tag A B D E F C Substr 1 Substr 2 Subtag 1 Subtag 2 S 1 1 A 01** * S 1 A 0100 0 S 2 1 1 1 B 0*1* * S 2 A B C 0110 1 S 3 1 1 C **** 1 S 3 B C 0010 1 S 4 1 1 1 D 11** * S 4 C D E 1110 1 S 5 1 1 1 E 1*1* * S 5 C D F 1101 1 S 6 1 1 1 F 1**1 * S 6 D E F 1111 0 β€’ Encode the extracted attribute(s) separately β€’ Concatenate subtags & match substrings 28

  29. MEME Tag Match String Substr 1 Substr 2 Subtag 1 Subtag 2 A B D E F C A 01** * S 1 A 0100 0 S 1 1 B 0*1* * S 2 A B C 0110 1 S 2 1 1 1 S 3 B C 0010 1 C **** 1 S 3 1 1 S 4 C D E 1110 1 D 11** * S 4 1 1 1 E 1*1* * S 5 C D F 1101 1 S 5 1 1 1 S 6 D E F 1111 0 F 1**1 * S 6 1 1 1 β€’ Number of strings: W = 6 β€’ Min number of strings β€’ Width of strings: 5 bits ⟹ β€’ Short match strings β€’ Memory cost: 30 bits β€’ Low memory cost 29

  30. Bridging attributes Attributes that (1) β€œbridge” over an excessive number of rows, and (2) when extracted, leave small mutually exclusive clusters. A B C D E F S 1 1 S 2 1 1 1 S 3 1 1 S 4 1 1 1 S 5 1 1 1 S 6 1 1 1 30

  31. More in paper β€’ We utilized a graph algorithm to detect the bridging attributes. β€’ We utilized structures within attributes to further save memory. β€’ We designed an incremental update function . 31

  32. Optimization for programmable switches Match String Substr 1 Substr 2 A 01** * If tag matches A’s match string β†’ …… B 0*1* * If tag matches B’s match string β†’ …… If tag matches C’s match string β†’ …… C **** 1 …… D 11** * E 1*1* * F 1**1 * 32

  33. Optimization for programmable switches Substr 1 Substr 2 A 01** C 1 B 0*1* If subtag 1 matches A’s match substring 1 β†’ …… If subtag 1 matches B’s match substring 1 β†’ …… D 11** If subtag 2 matches C’s match substring 2 β†’ …… E 1*1* …… F 1**1 β€’ Replace one tall, wide table with two shorter, narrower tables. β€’ Memory cost of match substrings: 21 bits 33

  34. Evaluation Attribute matrix of the world’s largest IXP A 1 A 2 A 3 … A 691 S 1 β€’ Matrix width: W = 691 S 2 β€’ Matrix height: H = 293,801 << 2 681 S 3 … β€’ Matrix density: D = 0.23% < 1 % S 293,801 34

  35. Compared to prior state-of-art (PathSets) Memory cost: 35

  36. Compared to prior state-of-art (PathSets) Memory cost: 87.7% reduction 36

Recommend


More recommend