Professional Documents
Culture Documents
Machine Learning Based Flow Entry Eviction For OpenFlow Switches
Machine Learning Based Flow Entry Eviction For OpenFlow Switches
Abstract— Software Defined Networking (SDN) is funda- switches can only accommodate 2000 flow entries [3]. On
mentally changing the way networks work, which enables the other hand, the arrival rate of flows can reach 10,000
programmable and flexible network management and configu- flows per second per server rack in data centers [4]. In order
ration. As the de facto southbound interface of SDN, OpenFlow
defines how the control plane can directly interact with the to forward the packets in these flows, massive flow entries
forwarding plane. In OpenFlow, flow tables play a significant should be installed in OpenFlow switches which are much
role in packet forwarding. However, the capacity of flow table more than the capacity of the flow table. In this case, it is
is limited due to power, cost, and silicon area constraints. extremely significant to manage flow tables efficiently.
The capacity-limited flow table cannot hold the explosive flows In previous versions of OpenFlow specification, new flow
generated by the fine-grained granularity control mechanism
used in SDN. Thus the flow table is frequently overflowed. In the entries will not be inserted in the flow table and an error will
case of overflow, eviction strategy which replaces existing flow be returned to the controller if a flow table is full. However,
entries with the new ones is critical to guarantee the efficient this approach is problematic because the service may be
usage of the flow table. In this paper, we present a machine disrupted. From OpenFlow 1.4.0, eviction mechanism is
learning based eviction approach which can identify whether a introduced to enable smoother degradation of behavior in
flow entry is active or inactive and thus timely evict the inactive
flow entries when flow table overflow occurs. Our simulations the case of flow table overflow. Once the flow table is full,
based on real network packet traces show that the proposed the eviction enabled OpenFlow switch can kick out existing
method can increase the usage of flow table by more than flow entries of lower importance to install new flow entries
55% and reduce the number of capacity misses by up to 80%, instead of simply rejecting them. The key issue for eviction
compared with the Least Recently Used eviction policy. mechanism is to decide which flow entry should be evicted.
Intuitively, we can come up with three naive strategies: Least
I. I NTRODUCTION
Recently Used (LRU), First In First Out (FIFO), and random.
Software Defined Networking (SDN) is widely regarded These three policies evict the LRU, first installed, random
as the next generation networking technique which can create flow entry respectively. A. Zarek compared the performance
programmable, flexible and agile networks whilst reducing of these three strategies [5] based on several real network
costs. Google, Amazon, Facebook, and other industrial giants traces and concluded that LRU outperforms the other two
have heavily invested and researched in SDN both in their strategies. Besides these three naive strategies, R. Challa
data centers and wide area networks. For example, Google et al. [6] employed multiple bloom filters to encode the
leveraged SDN principles to build its Jupiter network which importance value of flows which captures both the locality
achieves a capacity increase of 100x [1]. The core of SDN is and recentness of reference. With these values, the switch can
to separate the control plane from the forwarding/data plane evict the “least important” flow entry in the case of flow table
in switches. This separation makes network applications overflow. In addition, B. Lee et al. [7] proposed a fair eviction
programmable and accelerates network innovations with the strategy based on LRU, where a new mice flow can only evict
help of the abstracts provided by SDN. To achieve this a mice flow and an elephant flow can only evict an elephant
separation, most SDN implementations use the de facto flow. Furthermore, T. Pan et al. [8] proposed Adaptive Least
southbound protocol OpenFlow [2] as the communication Frequently Eviction to prevent elephant flows from being
interface between the control and data planes. The kernel evicted by massive mice flows by assigning elephant flows
of OpenFlow is a packet processing pipeline consisting of with higher priorities.
several flow tables. A flow table contains a set of flow entries, Basically, the key question for flow entry eviction is to
which are used to match and process incoming packets (e.g., determine whether a flow entry is inactive or not. And we
forward the packet to a port, modify the packet). However, would like to evict an inactive flow entry to install a new
flow table is extremely stressed because of the big gap coming flow. All the existing solutions apply some heuristics
between the capacity of flow table and the explosive number to infer which flow entry is most likely to be inactive. For
of flows. On one hand, flow table is placed in Ternary example, the least recently used flow entry is more likely to
Content Addressable Memory (TCAM) which can achieve be inactive than the most recently used one. However, the
single clock cycle lookup in most commodity OpenFlow inferences based on these heuristics cannot be very accurate,
switches. Due to power, cost, and silicon area constraints, the which seriously affect the usage of precious flow table space.
size of TCAM is very limited. As reported by G. Lu et al., In this paper, we propose to use machine learning techniques
the Broadcom chipset which is widely used in commercial to learn from historical data of flows and thus make a more
1,400
64000
1,200
62000
1,000
60000
800
58000
600
56000
400 10 9 8 7 6 5
200
Npkt
0
0 500 1,000 1,500 2,000 2,500 3,000 3,500 4,000 Fig. 5: The effects of Npkt on our proposal.
Time (second)
75000
Fig. 4: Number of active flow entries in the flow table for
the UNIV packet trace.
the number of capacity misses is reduced by 21% when Fig. 6: The effects of Pmin on our proposal.
Pmin is changed from 0.5 to 0.7, and increased by 15%
from 0.7 to 0.85. This is because small Pmin allows the
switch to evict flow entries which are classified as inactive can be estimated through:
with low confidence. In this case, it is highly possible that
an misclassified active flow entries will be evicted. On the Ne ≈ N (Pinactive > Pmin ), (2)
N (Pinactive >Pmin ∧y=0)
contrast, large Pmin will prevent the switch from evicting P [y = 0|Pinactive > Pmin ] ≈ N (Pinactive >Pmin ) , (3)
inactive flow entries which are not identified by the trained
model with very high confidence. Actually, with large Pmin , where N (·) is a function returns the number of elements
the switch will heavily relies on the LRU policy (line 22 in satisfying a predicate. Combining (2) and (3), we can get
Listing 2) for eviction instead of the machine learning one. Nright ≈ N (Pinactive > Pmin ∧ y = 1). (4)
Then, how can we set Pmin properly? According to Listing
2, a flow entry with Pinactive > Pmin will be evicted in Therefore, we can set Pmin by
the case of flow table overflow (see line 20). Suppose the ∗
Pmin = argmax N (Pinactive > Pmin ∧ y = 1). (5)
total number of such evictions is Ne . Then the objective of Pmin
our proposal is to maximize the number of right evictions In the case of the UNIV trace with 1K flow table, Pmin
Nright = Ne ∗ (1 − P [y = 0|Pinactive > Pmin ], where y = 0 generated by (5) is 0.65, which is close to the optimal value
indicates the flow entry is active. Note that minimizing the (0.7) in Fig. 6.
number of wrong evictions is different from maximizing the
number of right evictions. If we want to minimize the number V. C ONCLUSION AND L IMITATIONS
of wrong evictions, we can just set Pmin = 1 such that In this paper, we focused on improving flow entry eviction
Ne will approximate 0. In this case, our proposal will be by exploiting machine learning techniques for OpenFlow
meaningless because eviction decisions seldom depend on switches. Our proposal includes collecting datasets from
the the predictions of the trained random forest model. packet traces, training a random forest binary classification
Given Pmin , Nright can be approximated from the dataset model based on the collected data, and applying the trained
generated by Listing 1. In the dataset, every data sample has model for online flow entry eviction. Our case studies show
a label (i.e., y). Furthermore, with the trained model, we can that our proposal can achieve much fewer capacity misses
calculate Pinactive for every data sample. Therefore, Nright and higher flow table usage, compared with LRU policy.
However, we do not discuss some implementation issues
of our proposal in this paper. For example, how to associate
feature vectors with flow entries in OpenFlow switches?
How to update feature vectors with minimum cost? Another
problem is the memory overhead of our proposal. These
issues are related with the memory architecture of physical
OpenFlow switches, which will be discussed in our following
journal paper. In addition, we will conduct emulations to
check our proposal’s performance in terms of networking
metrics (e.g., latency, throughput) in our future works.
R EFERENCES
[1] A. Singh et al., “Jupiter rising: A decade of clos topologies and cen-
tralized control in google’s datacenter network,” SIGCOMM Comput.
Commun. Rev., vol. 45, no. 4, pp. 183–197, Aug. 2015.
[2] OpenFlow Switch Specification (Version 1.5.1), Open Networking
Foundation Std., Rev. 1.5.1, Mar. 2015.
[3] G. Lu et al., “Serverswitch: A programmable and high performance
platform for data center networks.” in Nsdi, vol. 11, 2011, pp. 2–2.
[4] T. Benson, A. Akella, and D. A. Maltz, “Network traffic character-
istics of data centers in the wild,” in Proceedings of the 10th ACM
SIGCOMM Conference on Internet Measurement. New York, NY,
USA: ACM, 2010, pp. 267–280.
[5] A. Zarek, “Openflow timeouts demystified,” Master’s thesis, University
of Toronto, 2012.
[6] R. Challa, Y. Lee, and H. Choo, “Intelligent eviction strategy for
efficient flow table management in openflow switches,” in 2016 IEEE
NetSoft Conference and Workshops (NetSoft), pp. 312–318.
[7] B.-S. Lee, R. Kanagavelu, and K. M. M. Aung, “An efficient flow
cache algorithm with improved fairness in software-defined data center
networks,” in 2013 IEEE 2nd International Conference on Cloud
Networking (CloudNet), pp. 18–24.
[8] T. Pan, X. Guo, C. Zhang, W. Meng, and B. Liu, “Alfe: A replacement
policy to cache elephant flows in the presence of mice flooding,” in
2012 IEEE International Conference on Communications (ICC), pp.
2961–2965.
[9] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol.
521, no. 7553, pp. 436–444, 2015.
[10] C. Sanders, Practical packet analysis: Using Wireshark to solve real-
world network problems. No Starch Press, 2017.
[11] E. Alpaydin, Introduction to machine learning. MIT press, 2014.
[12] R. Caruana, N. Karampatziakis, and A. Yessenalina, “An empirical
evaluation of supervised learning in high dimensions,” in Proceedings
of the 25th international conference on Machine learning. ACM,
2008, pp. 96–103.
[13] M. Kuźniar, P. Perešı́ni, and D. Kostić, “What you need to know
about sdn flow tables,” in Proceedings of 2015 Springer International
Conference on Passive and Active Network Measurement, pp. 347–
359.
[14] Z. Guo et al., “Star: Preventing flow-table overflow in software-defined
networks,” Computer Networks, vol. 125, no. Supplement C, pp. 15 –
25, 2017.
[15] M. Dusi, F. Gringoli, and L. Salgarelli, “Quantifying the accuracy
of the ground truth associated with internet traffic traces,” Computer
Networks, vol. 55, no. 5, pp. 1158–1167, 2011.
[16] F. Gringoli et al., “Gt: picking up the truth from the ground for internet
traffic,” ACM SIGCOMM Computer Communication Review, vol. 39,
no. 5, pp. 12–18, 2009.
[17] A. Vishnoi, R. Poddar, V. Mann, and S. Bhattacharya, “Effective
switch memory management in openflow networks,” in Proceedings
of the 8th ACM International Conference on Distributed Event-Based
Systems, New York, NY, USA, pp. 177–188.
[18] F. Pedregosa et al., “Scikit-learn: Machine learning in python,” Journal
of Machine Learning Research, vol. 12, no. Oct, pp. 2825–2830, 2011.
[19] Scikit-learn: Machine learning in python. [Online]. Available:
http://scikit-learn.org/stable/index.html