3. RESULTADOS OBTENIDOS
3.1 RESULTADOS DEL APRENDIZAJE
We now compare the space ef¿ciency of strict partitioning and shadow packing. The sole advantage of strict partitioning is that it has no horizontal boundaries. On the other hand, shadow packing has two key advantages. It has no vertical boundaries, and tables in the same row can share some table ID bits. Furthermore, we mitigate some of the disadvantage of horizontal boundaries by greedily packing tables in the shadow of other tables.
7.4 Table Consolidation
The basic idea of table consolidation is to use one TCAM table to represent multiple TCAM tables. Table consolidation is motivated by the following two observations. First, two TCAM tables may share common entries, which result in the same infor- mation being stored multiple times. Second, existing TCAM-based packet classi¿- cation systems are based on a “fat” TCAM and “thin” SRAM architecture, which means that the majority of the information (i.e.,, the predicates of rules) represent- ing a packet classi¿er is stored in TCAMs and little information (i.e.,, the decision of rules) is stored in SRAMs. However, because TCAMs are much more expensive than SRAMs, we ideally would store more information in SRAMs and less infor- mation in TCAMs.
We begin with two new concepts:k-decision rule and k-decision classi¿er. A
k-decision rule is a classi¿cation rule whose decision is an array of kdecisions. Ak-decision classi¿er is a sequence ofk-decision rules following the¿rst-match semantics. We formally de¿ne the table consolidation problem as follows:
De¿nition 7.4 (Table Consolidation Problem). Given k 1-decision classi¿ers ℂ1,⋅⋅⋅,ℂk,¿nd ak-decision classi¿erℂsuch that for anyi(1≤i≤k), the con-
ditionℂi≡C[i]holds.
We emphasize that ak-decision classi¿er can be viewed as a 1-decision classi¿er if we view the array ofkdecisions of each rule as one decision. In general, a k- decision classi¿er can be viewed as ak′-decision classi¿er wherek′<k, if we treat some decisions as one decision.
7.4.1 Table Consolidation Algorithm
We use multi-match FDDs to facilitate table consolidation. A multi-match FDD sat- is¿es all the properties of an all-match FDD except the condition j∈ {i1,i2,⋅⋅⋅,ik}
in the 5th property.
Our table consolidation algorithm works as follows. First, given a set ofkclas- si¿ers ℂ1,⋅⋅⋅,ℂk, we concatenate the set of classi¿ers into one classi¿erℂ1−k=
94 7 Sequential Decomposition ℂ1∣⋅⋅⋅∣ℂk. Second, we construct a multi-match FDD f fromℂ1−ksuch that f satis-
¿es the following additional condition: for any decision pathP, the terminal node ofPconsists ofknumbers{m1,m2,⋅⋅⋅,mk}where, for eachi(1≤i≤k), rulermi is the¿rst rule inℂi that containsP. In other words, for any decision pathP in
the multi-match FDD f and for any classi¿erℂi, only the index of the¿rst rule in
ℂithat containsP is included in the label ofP’s terminal node. Third, after the
multi-match FDD f is constructed, we run the TCAM Razor algorithm presented in [Meiners et al(2007)Meiners, Liu, and Torng] onfand generate the¿nal compact
k-decision classi¿erC. Figure 7.11 shows the process of consolidating two TCAM tablest1andt2. The¿nal 2-decision classi¿er is TCAM tablet4. The correctness of the table consolidation algorithm is based on Theorem 7.1.
Theorem 7.1.Given k 1-decision classi¿ersℂ1,⋅⋅⋅,ℂk, the table consolidation al-
gorithm generates a k-decision classi¿erℂwhere for any i (1≤i≤k), the condition
ℂi≡C[i]holds.
Fig. 7.11 Consolidation of 2-dimensional tables
7.4.2 Hierarchical Table Consolidation
In building a multi-match FDD from a set of classi¿ers, each classi¿er inÀuences the shape of the FDD and causes the FDD to grow. To localize the expansion impact of one classi¿er on others, we propose the followinghierarchical table consolidation
7.4 Table Consolidation 95
strategy. Givenkclassi¿ers,¿rst, we equally divide them into⌈k/m⌉buckets where every bucket hasmclassi¿ers except for one bucket that may have less thanmclas- si¿ers. Second, for the classi¿ers in each bucket, we apply the table consolidation algorithm and get anm-decision classi¿er. Thus, we get⌈k/m⌉classi¿ers. By treat- ing eachm-decision classi¿er as a 1-decision classi¿er, we apply the above process again on the⌈k/m⌉classi¿ers. This process repeats until we get the¿nalk-decision classi¿er. We refer to the strategy of choosingm=k as Àat table consolidation. Theorem 7.2 establishes the correctness of hierarchical table consolidation. Theorem 7.2 (Hierarchical Table Consolidation Theorem). Given the same in- put of k 1-decision classi¿ers and the same table consolidation algorithm, the strate- gies of hierarchical table consolidation andÀat table consolidation output the same k-decision classi¿er.
⇒ ⇒
(a) Classi¿er (b) Constructing FDD and tables
⇒
(c) Table Consolidation (d) Pipelined lookup process
96 7 Sequential Decomposition
7.4.3 TCAM/SRAM Space Tradeoff via Bounded Consolidation
Table consolidation creates a tradeoff between TCAM storage and SRAM stor- age. On one hand, merging multiple classi¿ers into one classi¿er results in less TCAM storage. On the other hand, each entry in the resulting classi¿er requires more SRAM for storing the decision list. We could simply merge all classi¿ers into a single classi¿er; however, this may require more SRAM space than what is avail- able. To address this issue, we propose the following bounded consolidation scheme. The basic idea of bounded consolidation is to limit the number of classi¿ers that we combine. Given a set ofk1-decision classi¿ers, we ¿rst sort the classi¿ers in de- creasing (or increasing) order according to size (i.e.,, the number of rules in each classi¿er). Second, we partition the sorted classi¿ers into⌈k/m⌉chunks where the ¿rst⌈k/m⌉ −1 chunks are of uniform sizem(1≤m≤k). Third, for every chunk, we apply the table consolidation algorithm to the classi¿ers that it contains. Finally, we get⌈k/m⌉multi-decision classi¿ers. Note thatmis an adjustable parameter.7.5 One-Dimensional Table Consolidation
While table consolidation can be applied tod-dimensional classi¿ers for arbitraryd, we show that it is especially effective for consolidating one-dimensional classi¿ers. In particular, Theorem 7.3 shows that table consolidation is guaranteed to reduce TCAM space occupied when applied to one-dimensional classi¿ers. Table consol- idation’s effectiveness on one-dimensional classi¿ers implies that it is especially effective when combined with sequential decomposition to minimize the space re- quired by any single classi¿er. We defer the proof of Theorem 7.3 to the appendix. Theorem 7.3.Given any set of k 1-decision 1-dimensional classi¿ersℂ1,⋅⋅⋅,ℂk,
the k-decision 1-dimensional classi¿erℂoutput by the TCAM distillation algorithm satis¿es the following condition:∣C∣ ≤ ∣C1∣+⋅⋅⋅+∣Ck∣ −k+1.
7.5.1 Table Consolidation with Sequential Decomposition
Because table consolidation is guaranteed to work well on one-dimensional clas- si¿ers, table consolidation can be integrated with the sequential decomposition scheme to further reduce the space required by a TCAM-based packet classi¿er. Basically, in the third step of pipelined-lookup sequential decomposition, for each ¿eldFi, we group all the tables ofFinodes and apply our table consolidation algo-
rithm to produce a multi-decision table rather than using table ID’s. For example, given the two tables of the twoF2nodesv0andv1, our table consolidation algorithm outputs the 2-decision tablet2in Figure 7.12(c). In this case, table consolidation re- duced the required number of TCAM entries from 4 to 3.