Download presentation

Presentation is loading. Please wait.

Published byBradley Estabrooks Modified over 2 years ago

1
Compressing Forwarding Tables Ori Rottenstreich (Technion, Israel) Joint work with Marat Radan, Yuval Cassuto, Isaac Keslassy (Technion, Israel) Carmi Arad, Tal Mizrahi, Yoram Revah (Marvell Israel) Avinatan Hassidim (Google Israel & Bar-Ilan Univ.)

2
Forwarding information in datacenter networks is stored in switch forwarding tables Example: o Lookup key: MAC Address + VLAN o Forwarding Information: Target Port Forwarding Tables in Datacenters 2 ?

3
Typical table size: hd·b bits Host virtualization in datacenter networks results in a rapid growth of forwarding tables. o More hosts ( h ) o More attributes ( d ) o More attribute values ( b ) Growth of Forwarding Tables 3 d fields, each of b bits (on average) 1 h h rows Field 1 Field 2 Field d This table architecture doesnt scale! hash-based matching Packet header

4
Direct access to all rows regardless of their indices o High packet rate Storing each row in a fixed-width memory word o We would like to minimize the required memory width Required Properties of a Solution 4 width row 1 row h

5
i P bits (with d fields) Illustration of access to the encoded forwarding table. A single encoded row of at most P bits is retrieved. Then, d pipelined accesses to d dictionaries are performed. Goal: Find d codes that minimize the maximal width P. Solution Overview σ1σ1 σ2σ2 σdσd 1 h hash-based matching h rows 5 001 1 10 Packet header

6
Table A with d=3 columns and its encoding scheme Obtained maximal width of bits A Forwarding Table Example Today d=3 dictionaries Suggested Solution 6 Encoded table Original table 3+1+1=5 2+1+2=5 2+1+1=4 2+1+2=5 3+1+1=5 2+1+2=5 width

7
Huffman encoding: o Minimizes the average width but not the maximal width o Existence of long rows Fixed uniform encoding: o Without long rows, but not efficient Our goal: Find an encoding scheme that minimizes the maximal width: Traditional Solutions 7

8
Definition 1 (Encoding Scheme): A n encoding scheme of a FIB table with d columns is composed of d prefix codes, one for each column. Definition 2 (Encoding Width): The encoding width of an encoding scheme is defined as the maximal sum of the lengths of the d codewords in the encoding of a row of A, i.e. Problem Definition 8

9
Definition 3 (Optimal Encoding Width): For a table A, we denote by the smallest possible width of an encoding scheme of A such that Our goal: Find an encoding scheme that minimizes the encoding width Constraint on the encoding scheme (Krafts Inequality): There exists a prefix encoding of the elements in a set with codeword lengths iff Problem Definition (2) 9

10
For a table A with h rows, we define the following optimization problem: We would like to minimize the maximal width P while satisfying the Krafts inequality for the d prefix codes The codeword lengths should be positive integers. Optimization Problem 10

11
Theorem: Finding the optimal encoding is NP-hard in the general case ( ). Convex Algorithm: o Consider the relaxed problem: codeword lengths are not necessarily integers. (The relaxed problem is convex.) o Take the ceiling of the codeword lengths in its solution o Example: Solution: (2.2, 3.71) (3, 4) Theorem: By taking the ceiling of the codeword lengths in an optimal solution to the relaxed problem, we achieve a legal encoding scheme that satisfies Approximation of the Optimal Encoding 11

12
Outline Introduction and Problem Definition General Properties Two Column FIB Tables Graph Representation Optimal Conditional Encoding Bounds on the Optimal Encoding Width Experimental Results Summary 12

13
Motivation: L2 MAC tables with two fields: Target Port + An additional attribute. Assumption: The table A has two columns with distinct elements in each column. Theorem: The optimal encoding width of A satisfies Two-Column FIB Tables 13

14
A two-column FIB table A can be represented as a bipartite graph. Example: Two-column FIB table with h=6 rows and (for W=2) distinct elements in each column. Graph Representation Forwarding table Bipartite graph 14

15
Given an encoding of one column, we would like to find an encoding of the second column that minimizes the encoding width P. For an element, we should consider the maximal codeword length of an element in that shares a row with. Notation: Optimal Conditional Encoding 15 ua y wb y y P bits v z u

16
Theorem: The optimal conditional encoding width satisfies Notes: We should encode in bits. Linear complexity Optimal Conditional Encoding 16

17
Reminder (Edge Cover): In an undirected graph a set of edges is an edge cover of if. Example: nodes at each side ( ) Intuition: Smaller covering number More independent edges Constraints on more elements Larger optimal width Lower Bound on the Optimal Encoding Width 17 (A) (B) Edge covering number: 8 Edge covering number: 14

18
Theorem: The optimal encoding width of a table A with an edge covering number satisfies Example: ( ) Lower Bound on the Optimal Encoding Width 18 (A) (B) Edge covering number: 8 Edge covering number: 14 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 1 4 4 4 4 4 4 4 1 4 4 4 4 4 4 4

19
Effectiveness of the encoding algorithm on synthetic FIB tables with d=2 columns and (W=8) elements, as a function of Zipf dist. parameter. Simulation details: 1000 rows, 10 iterations. Experimental Results A lower bound of. Lower parameter Closer to the uniform distribution 19 8 8 1 9 9 1

20
Table: 903 rows. Collected in the enterprise network of a large company. Without encoding: row width of 29 bits. With convex encoding: width of only 11 bits. Real-Life FIB Table 20 improvement

21
Concluding Remarks New architecture for compression of forwarding tables in datacenters Approximation of the optimal solution Analysis of the optimal encoding width 21

22
Thank You

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google