Transcript
Page 1: [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 VirtualOpenflow Switch

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

Ecole des Mines de Nantes

[email protected]

[email protected]

[email protected]

[email protected]

Abstract—In 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 networking

that is gaining popularity among researchers both in academia

and industry. This is partly due to its flexibility in quickly

deploying innovative networking applications, inline with the

software defined network vision, without going through the

painful and slow standardization process of new protocols.

This Openflow approach splits the control plane from the

data plane and move it to a logically centralized remote

controller. This controller maintains all the networking logic

in different software applications that push forwarding and

packet processing rules to the data plane either proactively

or reactively. The genericity of Openflow is achieved by

omitting the separation between layers and performing packet

processing on arbitrary packet header fields in any combination

of layers simultaneously. We use these approach to implement

our Network Processor (NP)-based Openflow switch. In this

paper, we propose a virtual implementation of the Openflow

switch where we aim to optimize the memory allocation

between the slices while ensuring fairness between them. In

fact, sharing the same physical resources between the slices

constitute an important challenge for the conception of high

performance virtual switch. As a first objective of our opti-

mization problem, allocating memory tables with minimum

of entries while maximizing the fairness between the slices

will allow an optimal share of the resources. In our proposed

implementation, pushing Openflow classifier wildcard rules in

Ternary Content Access Memory (TCAM) hardware memory

accelerates the lookup on multiple fields within a few number

of clock cycles. However, the TCAM is an energy-consuming

memory. In order to reduce the energy, we have to minimze

the energy-consumption while distributing the slice tables over

TCAM memory. To optimize such process and make-it energy-

efficient, previous studies intend to save energy indirectly by

improving the electronic architecture of the hardware devices.

In fact, not only the hardware resources affect the overall

power consumption but also the way how the resources are

used. For that, we will be able to provide a second objective

in our optimization problem that consists of minimizing the

consumed energy.

In this paper, we formulate the TCAM allocation problem

as a multi-objective optimization where we aim to minimize

the energy consumed and maximize the fairness between the

slices while allocating tables with sizes near the slice needs.

We show that the problem is NP-complete and we solve it

using the genetic algorithm and the tabu search.

II. RELATED WORK

Several work was proposed providing new energy-efficient

mechanism for TCAM. Some of them propose to partition the

TCAM into multiple blocks [2][3]. Based on this mechanism,

only few blocks of TCAM are precharged and searched for a

packet instead of searching the entire TCAM which leads to

a substantial power consumption. This mechanism distribute

uniformly rules over TCAM blocks in order to maximize the

power reduction. In other work, to reduce the use of TCAM

without invoking the centralized controller for each new 14-

tuples micro flow, the DevoFlow approach in [4] automatically

clones a matched general wildcard rule in the TCAM by

adding a specific exat match rule in the SRAM. In our

work, we propose to optimize the TCAM resource allocation

as a multi-objective function where we aim to reduce the

energy consumption and maximize the fairness between the

slices. We propose 2 algorithms to resolve the optimization

problem: 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

Page 2: [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)

our knowledge, this was never attempted before on virtual

Openflow switches.

III. RESOURCE ALLOCATION PROBLEM

The problem of allocating slice tables over the TCAM

resources can be modeled as an optimization problem. In

the problem objective’s, we minimize the consumed energy

while ensuring fairness between the slices when allocating

the TCAM resources. This objective is related to the slice’s

required resources, which has to be up to a certain value

that can be expressed as a constraint in the optimization

problem. With this consideration, minimizing the energy in

the objective, leading to better consolidation but less global

efficiency, can be treated off with other global performance

metrics such as fairness in order to provide higher resource

utilization with less energy while metting the slice needs. We

consider N slices that share the same TCAM resources. We

have K possible table sizes that can be created on the TCAM

depending on the key size of the table entry. We need to

optimize the allocation of the slice tables to meet the slice

needs.

A. Problem Formulation

We consider that every time a table is needed to be accessed,

it’s put in the active mode while the remaining tables are put

in low power mode. We use the energy consumption model

proposed in [1]. Therefore, the energy consumed by placing

the table of size j for the slice i is the sum of the access

and resynchronisation energies of table j and the low power

energy consumed by the other tables. Ea, Er and El represents

respectively the access, the resynchronization and low power

mode constant energies given by table I. Cj is the size of the

table j and Xik is a binary variable that take the value 1 if

we choose to allocate table with size j to the slice i and 0

otherwise.

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

+

m∑

k=1;k �=j

El ∗ (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 the

jain index as a fairness metric. The optimization problem is

formulated as an integer non linear programming where we

want to allocate TCAM resources between the slices fairly

while minimizing the energy consumed. Based on the inputs

and variables, our problem can be stated mathematically as

follows:

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

N∑N

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

N∑N

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 slice

i; Ni is the number of entries that a slice i needs to create

over the TCAM resources; CT is the TCAM capacity i.e the

maximum number of entries that can be created; μ and αare the weighting factors between the energy and the slice

fairness. The first constraint ensures that the slice requirement

in terms of number of entries in the memory are met. The

second constraint guarantee that the sum of all the table sizes

doesn’t exceed the total TCAM capacity. Finally, the third

constraint requires that the fairness index should maitain a

value 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 difficult

class of problem. The proof by restriction consists of showing

that our problem contains a known NP-complete problem as

a special case [5][6].

Theorem 1: Problem P is NP-complete.

Proof: Let s(Xij) =∑N

i=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) =∑N

i=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 the

subset containing the selected ones. Problem (P ) and (P ′)reduce to Find optimal U ′ to minimize

∑j∈U ′ s(Xij) Subject

to∑

j∈U ′ v(Xjk) ≤ BThis is the Knapsack problem which is NP-complete [8]. Thus,

the knapsack problem is a special case of our problem. We can

conclude by restriction that our problem is also NP-complete.

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

129

Page 3: [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)

IV. GENETIC ALGORITHM

We are faced with a multi-objective problem. Genetic Al-

gorithm (GA) are a popular meta-heuristic that is particularly

well suited for this class of problems. The approach is to

determine an initial population with a set of solutions then

apply crossover and mutation.

• Step 1: Based on Greedy algorithm, generate an initial

solution 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 with

replacement for each solution of the population and copy

them in Pt+1.

• Step 4: Calculate the fitness (objective function) of each

solution x in Pt+1.

• Step 5: select the best solutions (with the lowest objective

function) to place in Et+1.

• Step 6: If the stopping criterion is satisfied, stop and

return Et+1 else go to step 2.

V. TABU SEARCH ALGORITHM

In order to compare the Genetic algorithm results, we

choose another popular meta-heuristic that is particularly well

suited for the multi-objective problem: Tabu search. This

algorithm consists on looking for the optimal local solution.

• Step 1: Based on the Greedy algorithm, choose an initial

faisable solution S0.

• Step 2: In iteration t, we determine a new solution by

mutating 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, noted

Et.

• Step 4: If the stopping criterion is satisfied, stop and

return Et else go to step 2.

VI. NUMERICAL RESULTS AND DISCUSSION

We performed experiments based on a specific hardware

plateform: a pizza box consisting of an EZchip-NP4 [9][10].

It is a 100 Gigabit Network Processor including specialized

processors dedicated for various packet processing tasks. The

employed pizza box contains also search engines and lookup

tables as well as an external TCAM. In our evaluation, we

consider the implementation of a virtual Openflow switch over

Ezchip 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, the

fairness and TCAM resource utilization. We compare the

Genetic algoritm and Tabu search results. Fig.1 illustrates the

objective 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 reaches

results near the optimum compared to the tabu search which

reaches higher objective function. This algorithm starts with a

single initial solution and extremely depends on it. It’s efficient

but not scalable unlike the Genetic algorithm which is scalable.

The Genetic algorithm is more efficient especially when it

starts with a varied initial population. In facts, it explores an

important number of faisable solution.

Tabu search converges rapidly when the initial solution used

by the algorithm is near the optimum. However, if the solution

is far from the optimum the algorithm takes an important

number of iterations as illustrated in Fig.2. In this figure, we

note that the Genetic algorithm is less rapid than the Tabu

search.

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 the

maximization of the slice fairness. We note that the lowest

energy is achieved when we consider only the energy in

the objective function. The consumed energy increases when

we give more weight to the fairness. In fact, in case of 6

slices competing for the same TCAM resources, the consumed

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

130

Page 4: [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)

Fig. 3. Consumed energy.

Fig. 4. TCAM Resource Utilization.

energy when we just optimize the energy is 390 nJ and 550

nJ when we introduce the other objectives.

Fig.4 shows the utilization of the TCAM resources which

increases with the number of slices. When we focus on the

energy minimization, only one table is created for each slice

which increases the number of entries per table (This number

can reach 95000 entries). We optimize the number of tables

and not the number of entries. In fact, we consume less energy

when we access to less tables. When we give more weight to

the resource minimization (table size), the number of table per

slice increases but the size of the TCAM table decreases. This

is due to the optimization of the table size which allows the

creation of more tables with a number of entries that is close

to the slice need whereas the creation of a single table will

lead to an important table size.

In Fig.5, we see that we achieve better fairness between the

slices 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 fairness

index is not maintained with the number of slices.

Fig. 5. Fairness Index.

VII. CONCLUSION

In this paper, we proposed to optimize the TCAM table

resource allocation. As a first objective, minimizing the con-

sumed energy while assigning the minimum of table entries

over the TCAM will consolidate the slice entries in the same

table to save the access and low power energies. Consequently,

we provide an option to maximize the fairness between the

slice as a second objective to meet the slice need fairly. We

formulate a multi-objective problem and propose the Genetic

and Tabu search algorithms to solve it. Our multi-objective

problem offer the flexibility to the provider to whether give

preference to the lowest energy consumption by consolidating

all the slice entries in the same table or the highest fairness

by approaching the slice requirement and then reducing the

table size. Our two proposed algorithms converge in few time.

However, the Genetic algorithm is more scalable.

As a future work, in order to fully profit from the energy

reduction when allocating the TCAM table, we will identify

parameters that provide solutions where the energy consumed

will be between two thresholds while still satisfying slice’s

fairness constraint. A minimal threshold to prevent consoli-

dating all entries in the same table and then choosing table

size that go far from the slice requirement and a maximal

threshold to minimize the waste of energy consumption.

REFERENCES

[1] N. McKeown, T. Anderson, H. Balakrishnan, G. Parulkar, L. Peterson,J. Rexford, S. Shenker, and J. Turner, OpenFlow: enabling innovation incampus networks, ACM SIGCOMM Computer Communication Review,vol. 38, no. 2, pp. 6974, 2008.

[2] H. Lu and M. Pan. Partition filter set for power-efficient packet classifi-cation. In Proc. Globecom, pages 15, 2006.

[3] K. Zheng, H. Che, Z. Wang, B. Liu, and X. Zhang. Dppc-re: Tcam-based distributed parallel packet classification with range encoding. IEEETransactions on Computers, pages 947961, 2006.

[4] J. Mogul, J. Tourrilhes, P. Yalagandula, P. Sharma, A. Curtis, and S.Banerjee, Devoflow: Cost-effective flow management for high perfor-mance enterprise networks, 2010.

[5] A. Abutaleb and V. Li, Location update optimization in personal com-munication systems, Wireless Networks, vol. 3, no. 3, pp. 205216,1997.

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

131

Page 5: [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)

[6] P. Bhattacharjee, D. Saha, and A. Mukherjee, An approach for locationarea planning in a personal communication services network (PCSN),Wireless Communications, IEEE Transactions on, vol. 3, no. 4, pp.11761187, 2004.

[7] H. Pirkul, S. Narasimhan, and P. De, Locating concentrators for primaryand secondary coverage in a computer communications network, Com-munications, IEEE Transactions on, vol. 36, no. 4, pp. 450458, 2002.

[8] M. Garey and D. Johnson, Computers and intractability. A guide tothe theory of NP-completeness. A Series of Books in the MathematicalSciences. WH Freeman and Company, San Francisco, Calif, 1979.

[9] Omar El Ferkouss, Sergio Correia, Racha Ben Ali, Yves Lemieux,Martin Julien, Mallik Tatipamula, and Cherkaoui Omar. On the flexibilityof MPLS applications over an OpenFlow-enabled network. In IEEEGLOBECOM 2011 - Next Generation Networking Symposium (GC11- NGN), Houston, Texas, USA, December 2011

[10] O. El Ferkouss, R. Matela, S. Correia, B. Boughzala, Y. Lemieux, R.Ben Ali, M. Tatipamula, M. Lemay, O. Cherkaoui. A 100 Gbps Openfow1.1 Switch. Technical report, 2011.

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

132


Top Related