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

β–Ά
memory efficient membership encoding in switches
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

Memory-Efficient Membership Encoding in Switches

Mengying Pan, Robert MacDavid, Shir Landau-Feibish, Jennifer Rexford

1

slide-2
SLIDE 2

Policy-Based Forwarding

  • Forward packets to achieve sophisticated policy goals.

2

𝒢 𝒡 𝒴

Set of attributes = { A, D, F, … } If set contains A β†’ forward to 𝒴 If set contains B β†’ forward to 𝒡 ……

slide-3
SLIDE 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.

3

𝒢 𝒡 𝒴

Set of attributes = { A, D, F, … } If set contains A β†’ forward to 𝒴 If set contains B β†’ forward to 𝒡 ……

slide-4
SLIDE 4

Examples of membership-based forwarding

4

A B C

A ∈ S β†’ A else β†’ S2

S = { A, C }

S1 S2 S3 S4 Middlebox chain

Attributes: middleboxes Attribute set: set of middleboxes to visit

slide-5
SLIDE 5

Examples of membership-based forwarding

5

A B C S1 S2 S3 S4 Middlebox chain

Attributes: middleboxes Attribute set: set of middleboxes to visit B ∈ S β†’ B else β†’ S3

S = { A, C }

slide-6
SLIDE 6

Examples of membership-based forwarding

6

Middlebox chain

Attributes: middleboxes Attribute set: set of middleboxes to visit C ∈ S β†’ C else β†’ S4

A B C S1 S2 S3 S4

S = { A, C }

slide-7
SLIDE 7

Examples of membership-based forwarding

7

A B C

S = { A, C }

S = { A, C }

Middlebox chain

Attributes: middleboxes Attribute set: set of middleboxes to visit A B C S1 S2 S3 S4

Internet Exchange Point

Attributes: peers Attribute set: set of peers reaching IP destination A ∈ S β†’ A B ∈ S β†’ B C ∈ S β†’ C

slide-8
SLIDE 8

Membership encoding scheme

  • Encoding: a set of attributes β‡’ a tag attached to the packet
  • Querying: an attribute β‡’ one or multiple match strings

8

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 tag matches A’s match string #2 β†’ forward to A …… If set contains A β†’ forward to A

slide-9
SLIDE 9

Attribute matrix

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

9

H = 6 W = 6

A chain of six middleboxes A-F with six classes of traffic

Attribute set S1 {A} S2 {A,B,C} S3 {B,C} S4 {C,D,E} S5 {C,D,F} S6 {D,E,F}

  • Column = attribute
  • Row = attribute set
  • Matrix width: W
  • Matrix height: H
  • Matrix density: D
slide-10
SLIDE 10

Two strawman approaches: bitmap

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

10

slide-11
SLIDE 11

Two strawman approaches: bitmap

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

11

Tag S1 A 100000

slide-12
SLIDE 12

Two strawman approaches: bitmap

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

12

Tag S1 A 100000 S2 A B C 111000 S3 B C 011000 S4 C D E 001110 S5 C D F 001101 S6 D E F 000111

slide-13
SLIDE 13
  • Long match strings!
  • High memory cost!

Two strawman approaches: bitmap

13

Match String A 1***** B *1**** C **1*** D ***1** E ****1* F *****1 A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1 S3 B C 011000 S4 C D E 001110 S5 C D F 001101 S6 D E F 000111 Tag S1 A 100000 S2 A B C 111000

  • Number of strings: W = 6
  • Width of strings: W = 6 bits
  • Memory cost: W2= 36 bits

⟹

slide-14
SLIDE 14

Two strawman approaches: flat tags

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

14

slide-15
SLIDE 15

Two strawman approaches: flat tags

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

15

Tag S1 A 000

slide-16
SLIDE 16

Two strawman approaches: flat tags

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

16

S2 A B C 001 Tag S1 A 000

slide-17
SLIDE 17

Two strawman approaches: flat tags

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

17

S2 A B C 001 Tag S1 A 000 S3 B C 010 S4 C D E 011 S5 C D F 100 S6 D E F 101

slide-18
SLIDE 18

Two strawman approaches: flat tags

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

18

S2 A B C 001 Tag S1 A 000 S3 B C 010 S4 C D E 011 S5 C D F 100 S6 D E F 101 Match String A 000 A 001 B 001 B 010 … … F 100 F 101

  • Number of strings: WHD = 15
  • Width of strings: log(H) = 3 bits
  • Memory cost: WHD log(H) = 45 bits
  • Many strings!
  • High memory cost!

⟹

slide-19
SLIDE 19

Goals

19

  • Small memory cost of match strings
  • Small number of match strings
  • Short match strings (i.e. short tags)
slide-20
SLIDE 20

Why can we compress?

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

20

  • Matrix width: W
  • Matrix height: H
  • Matrix density: D

H = 6 W = 6

<< < 1 % 2W << 26

slide-21
SLIDE 21

Why can we compress?

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

21

  • Matrix width: N
  • Matrix height: M << N2
  • Matrix density < 1 %

M = 6 N = 6

Sparsity of attribute matrix Structures within attributes ⇩ Memory Efficient Membership-Encoding

slide-22
SLIDE 22

Clustering-based encoding scheme

22

1 1 1 1 1 1 1 1 1 1 1

Mutually exclusive clusters can be encoded efficiently.

slide-23
SLIDE 23

Clustering-based encoding scheme

23

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

Mutually exclusive clusters can be encoded efficiently. cluster ID + cluster bitmap

slide-24
SLIDE 24

Clustering-based encoding scheme

24

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1 Match String A 01* B 0*1

Cluster ID = 0 Bitmap of {A, B} cluster ID + cluster bitmap

slide-25
SLIDE 25

Clustering-based encoding scheme

25

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1 Match String A 01* B 0*1 D 11** E 1*1* F 1**1

Cluster ID = 1 Bitmap of {D, E, F} cluster ID + cluster bitmap

slide-26
SLIDE 26

Clustering-based encoding scheme

26

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1 Match string A 01* B 0*1 D 11** E 1*1* F 1**1 Tag S1 A 010 S2 A B C 011 S3 B C 001 S4 C D E 1110 S5 C D F 1101 S6 D E F 1111

cluster ID + cluster bitmap

slide-27
SLIDE 27

Tag S1 A 0100 S2 A B C 0110 S3 B C 0010 S4 C D E 1110 S5 C D F 1101 S6 D E F 1111 Match string A 01** B 0*1* D 11** E 1*1* F 1**1

Clustering-based encoding scheme

27

A B C D E F S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

  • Number of match strings: 5
  • Width of match strings: 4 bits
slide-28
SLIDE 28

Substr 1

A 01** B 0*1* C **** D 11** E 1*1* F 1**1

Substr 2

* * 1 * * * Match String

MEME

28

  • Encode the extracted attribute(s) separately
  • Concatenate subtags & match substrings

A B D E F S1 1 S2 1 1 S3 1 S4 1 1 S5 1 1 S6 1 1 1

Subtag 1

S1 A 0100 S2 A B C 0110 S3 B C 0010 S4 C D E 1110 S5 C D F 1101 S6 D E F 1111 C 1 1 1 1

Subtag 2

1 1 1 1 Tag

slide-29
SLIDE 29

MEME

29

A B D E F S1 1 S2 1 1 S3 1 S4 1 1 S5 1 1 S6 1 1 1 Match String

Substr 1 Substr 2

A 01** * B 0*1* * C **** 1 D 11** * E 1*1* * F 1**1 * Tag

Subtag 1 Subtag 2

S1 A 0100 S2 A B C 0110 1 S3 B C 0010 1 S4 C D E 1110 1 S5 C D F 1101 1 S6 D E F 1111 C 1 1 1 1

  • Number of strings: W = 6
  • Width of strings: 5 bits
  • Memory cost: 30 bits
  • Min number of strings
  • Short match strings
  • Low memory cost

⟹

slide-30
SLIDE 30

Bridging attributes

30

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 S1 1 S2 1 1 1 S3 1 1 S4 1 1 1 S5 1 1 1 S6 1 1 1

slide-31
SLIDE 31

More in paper

31

  • 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.
slide-32
SLIDE 32

Optimization for programmable switches

32

Substr 1

A 01** B 0*1* C **** D 11** E 1*1* F 1**1

Substr 2

* * 1 * * * Match String

If tag matches A’s match string β†’ …… If tag matches B’s match string β†’ …… If tag matches C’s match string β†’ …… ……

slide-33
SLIDE 33

Optimization for programmable switches

33

Substr 1

A 01** B 0*1* D 11** E 1*1* F 1**1

Substr 2

1

If subtag 1 matches A’s match substring 1 β†’ …… If subtag 1 matches B’s match substring 1 β†’ …… If subtag 2 matches C’s match substring 2 β†’ …… ……

C

  • Replace one tall, wide table with two shorter, narrower tables.
  • Memory cost of match substrings: 21 bits
slide-34
SLIDE 34

Evaluation

34

A1 A2 A3 … A691 S1 S2 S3 … S293,801

Attribute matrix of the world’s largest IXP

  • Matrix width: W = 691
  • Matrix height: H = 293,801 << 2681
  • Matrix density: D = 0.23% < 1 %
slide-35
SLIDE 35

Compared to prior state-of-art (PathSets)

35

Memory cost:

slide-36
SLIDE 36

Compared to prior state-of-art (PathSets)

36

Memory cost: 87.7% reduction

slide-37
SLIDE 37

Practical meanings

37

Tag width: 62 bits # match strings: 691 (one match string per attribute)

  • A modern switch (6Mb TCAM memory) saves ∼607K match strings.
  • Every peer can define one policy for every attributes.
  • Less churn in policy updates.
  • Far below the hundreds of bytes that a modern switch can parse.

Memory cost: 87.7% reduction This paves the way for deployment of policy-based forwarding applications, including software-defined IXPs.