# [IEEE 2013 12th Annual Mediterranean Ad Hoc Networking Workshop (MED-HOC-NET) - Ajaccio, France (2013.06.24-2013.06.26)] 2013 12th Annual Mediterranean Ad Hoc Networking Workshop (MED-HOC-NET) - TCAM table resource allocation for virtual openflow switch

Post on 13-Mar-2017

215 views

Embed Size (px)

TRANSCRIPT

TCAM Table Resource Allocation for VirtualOpenflow Switch

Imen Limam Bedhiaf, Richard Burguin, Omar Cherkaoui and Mikael SalaunUniversity of Quebec at Montreal

Ecole des Mines de Nanteslimam.imen@courrier.uqam.carichard.burguin@netvirt.cacherkaoui.omar@uqam.camikael.salaun@emn.fr

AbstractIn a recent effort to push forward the powerfulconcept of software defined networks, Openflow has gained alot of popularity as a practical approach to split the data andthe control planes by standardizing an open interface that allowremote software controllers to dictate the forwarding behavior ofnetwork devices. This paper presents a TCAM resource allocationmechanism for the implementation of virtual Openflow v1.1switch. This mechanism, based on optimization, aims to allocatethe slice tables over the TCAM resources while minimizing theTCAM energy-consumption and maximizing the fairness betweenthe slices. We formulate the problem as an integer non linearprogramming and show that his complexity is NP-complete. Wesolve it using Genetic algorithm and Tabu search. We compareour proposed algorithms and show that they provide near optimalsolutions in short time. Our multi-objective problem offer theflexibility to the user to whether give preference to the lowesttable allocation energy or the highest fairness between the slices.

I. INTRODUCTION

Openflow [1] is a new practical approach in networkingthat is gaining popularity among researchers both in academiaand industry. This is partly due to its flexibility in quicklydeploying innovative networking applications, inline with thesoftware defined network vision, without going through thepainful and slow standardization process of new protocols.This Openflow approach splits the control plane from thedata plane and move it to a logically centralized remotecontroller. This controller maintains all the networking logicin different software applications that push forwarding andpacket processing rules to the data plane either proactivelyor reactively. The genericity of Openflow is achieved byomitting the separation between layers and performing packetprocessing on arbitrary packet header fields in any combinationof layers simultaneously. We use these approach to implementour Network Processor (NP)-based Openflow switch. In thispaper, we propose a virtual implementation of the Openflowswitch where we aim to optimize the memory allocationbetween the slices while ensuring fairness between them. Infact, sharing the same physical resources between the slicesconstitute an important challenge for the conception of highperformance virtual switch. As a first objective of our opti-mization problem, allocating memory tables with minimumof entries while maximizing the fairness between the slices

will allow an optimal share of the resources. In our proposedimplementation, pushing Openflow classifier wildcard rules inTernary Content Access Memory (TCAM) hardware memoryaccelerates the lookup on multiple fields within a few numberof clock cycles. However, the TCAM is an energy-consumingmemory. In order to reduce the energy, we have to minimzethe energy-consumption while distributing the slice tables overTCAM memory. To optimize such process and make-it energy-efficient, previous studies intend to save energy indirectly byimproving the electronic architecture of the hardware devices.In fact, not only the hardware resources affect the overallpower consumption but also the way how the resources areused. For that, we will be able to provide a second objectivein our optimization problem that consists of minimizing theconsumed energy.In this paper, we formulate the TCAM allocation problem

as a multi-objective optimization where we aim to minimizethe energy consumed and maximize the fairness between theslices while allocating tables with sizes near the slice needs.We show that the problem is NP-complete and we solve itusing the genetic algorithm and the tabu search.

II. RELATED WORK

Several work was proposed providing new energy-efficientmechanism for TCAM. Some of them propose to partition theTCAM into multiple blocks [2][3]. Based on this mechanism,only few blocks of TCAM are precharged and searched for apacket instead of searching the entire TCAM which leads toa substantial power consumption. This mechanism distributeuniformly rules over TCAM blocks in order to maximize thepower reduction. In other work, to reduce the use of TCAMwithout invoking the centralized controller for each new 14-tuples micro flow, the DevoFlow approach in [4] automaticallyclones a matched general wildcard rule in the TCAM byadding a specific exat match rule in the SRAM. In ourwork, we propose to optimize the TCAM resource allocationas a multi-objective function where we aim to reduce theenergy consumption and maximize the fairness between theslices. We propose 2 algorithms to resolve the optimizationproblem: Genetic algorithm and Tabu search. to the best of

978-1-4799-1004-5/13/$31.00 2013 IEEE

2013 12th Annual Mediterranean Ad Hoc Networking Workshop (MED-HOC-NET)

128

our knowledge, this was never attempted before on virtualOpenflow switches.

III. RESOURCE ALLOCATION PROBLEM

The problem of allocating slice tables over the TCAMresources can be modeled as an optimization problem. Inthe problem objectives, we minimize the consumed energywhile ensuring fairness between the slices when allocatingthe TCAM resources. This objective is related to the slicesrequired resources, which has to be up to a certain valuethat can be expressed as a constraint in the optimizationproblem. With this consideration, minimizing the energy inthe objective, leading to better consolidation but less globalefficiency, can be treated off with other global performancemetrics such as fairness in order to provide higher resourceutilization with less energy while metting the slice needs. Weconsider N slices that share the same TCAM resources. Wehave K possible table sizes that can be created on the TCAMdepending on the key size of the table entry. We need tooptimize the allocation of the slice tables to meet the sliceneeds.

A. Problem Formulation

We consider that every time a table is needed to be accessed,its put in the active mode while the remaining tables are putin low power mode. We use the energy consumption modelproposed in [1]. Therefore, the energy consumed by placingthe table of size j for the slice i is the sum of the accessand resynchronisation energies of table j and the low powerenergy consumed by the other tables. Ea, Er and El representsrespectively the access, the resynchronization and low powermode constant energies given by table I. Cj is the size of thetable j and Xik is a binary variable that take the value 1 ifwe choose to allocate table with size j to the slice i and 0otherwise.

Eij = Ea (1.3)log2(Cj/8) + Er (1.3)log2(Cj/8)

+

m

k=1;k =jEl (1.3)log2(Ck/8) Xik

TABLE IENERGY CONSUMPTION

Operating Mode Energy Consumption (nJ)Active 3.57Low power 0.83Resynchronization 1.66

To ensure fairness between the slices, we consider thejain index as a fairness metric. The optimization problem isformulated as an integer non linear programming where wewant to allocate TCAM resources between the slices fairlywhile minimizing the energy consumed. Based on the inputsand variables, our problem can be stated mathematically asfollows:

min

K

j=1

EijXij +

N

i=1

K

j=1

(Cj Ki/80)Xij

(N

i=1

Kj=1 Eij (Cj Ki/80)Xij)2

NN

i=1(K

j=1 Eij (Cj Ki/80)Xij)2(1)

K

j=1

(Cj Ki/80)Xij Ni, i = 1, 2, ...N (2)

N

i=1

K

j=1

(Cj Ki/80)Xij CT (3)

(N

i=1

Kj=1 Eij (Cj Ki/80)Xij)2

NN

i=1(K

j=1 Eij (Cj Ki/80)Xij)2 (4)

Xij {0, 1} i = 1, 2.....N, j = 1, 2, ...K (5)

where Ki is the key size of the table entry for the slicei; Ni is the number of entries that a slice i needs to createover the TCAM resources; CT is the TCAM capacity i.e themaximum number of entries that can be created; and are the weighting factors between the energy and the slicefairness. The first constraint ensures that the slice requirementin terms of number of entries in the memory are met. Thesecond constraint guarantee that the sum of all the table sizesdoesnt exceed the total TCAM capacity. Finally, the thirdconstraint requires that the fairness index should maitain avalue more or equal to a threshold which varies in [0, 1].

B. Computational complexity

In the following proposition, we use a proof by restriction[7][8] to show that our problem belongs to a notably difficultclass of problem. The proof by restriction consists of showingthat our problem contains a known NP-complete problem asa special case [5][6].Theorem 1: Problem P is NP-complete.Proof: Let s(Xij) =

Ni=1(Cj Ki/80)Xij be the cost

of creating TCAM table of size j for the slice i, i = 1, 2.....N .Let v(Xij) =

Ni=1

Kj=1(Cj Ki/80)Xij and B = CT .

We consider the restricted case where = 0 and = 0.We also relax the problem by omitting the third constraint.Let U be the set of all the table sizes and U U be thesubset containing the selected ones. Problem (P ) and (P )reduce to Find optimal U to minimize

jU s(Xij) Subject

to

jU v(Xjk) BThis is the Knapsack problem which is NP-complete [8]. Thus,the knapsack problem is a special case of our problem. We canconclude by restriction that our problem is also NP-complete.

2013 12th Annual Mediterranean Ad Hoc Networking Workshop (MED-HOC-NET)

129

IV. GENETIC ALGORITHM

We are faced with a multi-objective problem. Genetic Al-gorithm (GA) are a popular meta-heuristic that is particularlywell suited for this class of problems. The approach is todetermine an initial population with a set of solutions thenapply crossover and mutation.

Step 1: Based on Greedy algorithm, generate an initialsolution P0 (population) and set E0 = (set of solution).

Step 2: Crossover the parent solution in Pt Et: Choose randomly a pair of solution to crossover. Determine randomly two points to use for the cutting

area Interchange the cutting area in the solution matrix. Generate two new solutions.

Step 3: Mutation using binary tournament selection withreplacement for each solution of the population and copythem in Pt+1.

Step 4: Calculate the fitness (objective function) of eachsolution x in Pt+1.

Step 5: select the best solutions (with the lowest objectivefunction) to place in Et+1.

Step 6: If the stopping criterion is satisfied, stop andreturn Et+1 else go to step 2.

V. TABU SEARCH ALGORITHM

In order to compare the Genetic algorithm results, wechoose another popular meta-heuristic that is particularly wellsuited for the multi-objective problem: Tabu search. Thisalgorithm consists on looking for the optimal local solution.

Step 1: Based on the Greedy algorithm, choose an initialfaisable solution S0.

Step 2: In iteration t, we determine a new solution bymutating a bit in the previous solution of iteration t 1.Each mutation constitute a new solution if feasible.

Step 3: Select the best solution of the iteration t, notedEt.

Step 4: If the stopping criterion is satisfied, stop andreturn Et else go to step 2.

VI. NUMERICAL RESULTS AND DISCUSSION

We performed experiments based on a specific hardwareplateform: a pizza box consisting of an EZchip-NP4 [9][10].It is a 100 Gigabit Network Processor including specializedprocessors dedicated for various packet processing tasks. Theemployed pizza box contains also search engines and lookuptables as well as an external TCAM. In our evaluation, weconsider the implementation of a virtual Openflow switch overEzchip NP-4. The total capacity of TCAM is CT = 131072entries and we can have 17 possible table sizes, Cj = 2z

where z [1, 17]. We set = 0.5, = 20, = 10.000and we vary the number of slices N . For our experiments,we evaluate the objective function, the consumed energy, thefairness and TCAM resource utilization. We compare theGenetic algoritm and Tabu search results. Fig.1 illustrates theobjective function for the Tabu search and Genetic algorithm.

Fig. 1. Comparaison of the Tabu and Genetic algorithm.

Fig. 2. Algorithm running time.

We note that the Genetic algorithm is more efficient. It reachesresults near the optimum compared to the tabu search whichreaches higher objective function. This algorithm starts with asingle initial solution and extremely depends on it. Its efficientbut not scalable unlike the Genetic algorithm which is scalable.The Genetic algorithm is more efficient especially when itstarts with a varied initial population. In facts, it explores animportant number of faisable solution.Tabu search converges rapidly when the initial solution used

by the algorithm is near the optimum. However, if the solutionis far from the optimum the algorithm takes an importantnumber of iterations as illustrated in Fig.2. In this figure, wenote that the Genetic algorithm is less rapid than the Tabusearch.Fig.3 illustrates the consumed energy when we consider

only the minimization of the energy in the objective function.Then, we introduce the minimization of the table size and themaximization of the slice fairness. We note that the lowestenergy is achieved when we consider only the energy inthe objective function. The consumed energy increases whenwe give more weight to the fairness. In fact, in case of 6slices competing for the same TCAM resources, the consumed

2013 12th Annual Mediterranean Ad Hoc Networking Workshop (MED-HOC-NET)

130

Fig. 3. Consumed energy.

Fig. 4. TCAM Resource Utilization.

energy when we just optimize the energy is 390 nJ and 550nJ when we introduce the other objectives.

Fig.4 shows the utilization of the TCAM resources whichincreases with the number of slices. When we focus on theenergy minimization, only one table is created for each slicewhich increases the number of entries per table (This numbercan reach 95000 entries). We optimize the number of tablesand not the number of entries. In fact, we consume less energywhen we access to less tables. When we give more weight tothe resource minimization (table size), the number of table perslice increases but the size of the TCAM table decreases. Thisis due to the optimization of the table size which allows thecreation of more tables with a number of entries that is closeto the slice need whereas the creation of a single table willlead to an important table size.

In Fig.5, we see that we achieve better fairness between theslices when we introduce the fairness index. When goes up,we give more weight to the slice fairness. In fact for 10.000, we reach an index fairness of 0.95. However, when = 0, the solution just satisfy the constraint. The fairnessindex is not maintained with the number of slices.

Fig. 5. Fairness Index.

VII. CONCLUSION

In this paper, we proposed to optimize the TCAM tableresource allocation. As a first objective, minimizing the con-sumed energy while assigning the minimum of table entriesover the TCAM will consolidate the slice entries in the sametable to save the access and low power energies. Consequently,we provide an option to maximize the fairness between theslice as a second objective to meet t...

Recommended