Flowsense: Monitoring Network Utilization With Zero Measurement Cost
Flowsense: Monitoring Network Utilization With Zero Measurement Cost
Flowsense: Monitoring Network Utilization With Zero Measurement Cost
Abstract. Flow-based programmable networks must continuously monitor performance metrics, such as link utilization, in order to quickly
adapt forwarding rules in response to changes in workload. However, existing monitoring solutions either require special instrumentation of the
network or impose significant measurement overhead.
In this paper, we propose a push-based approach to performance monitoring in flow-based networks, where we let the network inform us of
performance changes, rather than query it ourselves on demand. Our
key insight is that control messages sent by switches to the controller
carry information that allows us to estimate performance. In OpenFlow
networks, PacketIn and FlowRemoved messagessent by switches to the
controller upon the arrival of a new flow or upon the expiration of a
flow entry, respectivelyenable us to compute the utilization of links
between switches. We conduct a) experiments on a real testbed, and b)
simulations with real enterprise traces, to show accuracy, and that it can
refresh utilization information frequently (e.g., at most every few seconds) given a constant stream of control messages. Since the number of
control messages may be limited by the properties of traffic (e.g., long
flows trigger sparse FlowRemoveds) or by the choices made by operators
(e.g., proactive or wildcard rules eliminate or limit PacketIns), we discuss how our proposed passive approach can be combined with active
approaches with low overhead.
Introduction
OpenFlow Overview
Operation
The OpenFlow protocol provides functions to query switches for the number of
packets or bytes in flows matching against a specific rule or traversing a specific port. Prior work relies on this capability to compute utilization in the network [11, 6]. OpenTM [11] measures network-wide traffic matrix by periodically
polling one switch on each flows path and then combining the measurements.
Polling a single switch does not impose significant load on the network but
may affect accuracy if the switch is not carefully chosen. Jose et al. [6] detect
heavy hitters by continually adapting polling rules to focus on the flows that
are more likely to have high volume. Both approaches have to carefully schedule
Utilization
Monitor
PacketIn
OpenFlow Controlller
PacketIn
f2
t3
f3
t4
t5
t6
FlowRem
t2
FlowRem
1
control
plane f
1
PacketIn
Control
Trafc
Parser
FlowRem
Utilization
Table
time
Fig. 1. (left) FlowSense design: Parser module captures control traffic and sends it
the monitor. The monitor updates utilization values at every checkpoint according to
Algorithm 1. (right) Visualization of how link utilization is estimated with the aid of
PacketIn and FlowRemoved messages.
FlowSense
In this section, we describe the design of FlowSense and how it uses control
traffic to measure the utilization of every link in the network.
3.1
Design
FlowSense uses FlowRemoved and PacketIn messages to compute network utilization on inter-switch links. FlowRemoveds are triggered by switches when flow
entries expire, and they inform the controller of several properties of the expired
entry. Three of these properties are most important to us: (1) the duration of the
entry in the flow table, (2) the amount of traffic matched against it, and (3) the
input port of traffic that matches the entry (we do not consider wildcard rules
for now). This information helps us infer the number of bytes that the flows that
matched this entry contributed to the utilization on the link that ends in the
specified input port.
Whenever a flow entry expires and triggers a FlowRemoved message, we add a
new checkpoint for the corresponding link. We set the timestamp for the checkpoint as the time at which traffic last matched the expired flow entry. If an
entrys soft timeout expires, the checkpoint is the FlowRemoved timestamp minus the soft timeout. If the entrys hard timeout expires, we cannot tell how long
the flow was actually active for, so we set the checkpoint as the FlowRemoved
timestamp and assume it has been active for the entire flow duration.
At every checkpoint, FlowSense can estimate the contribution to the links
utilization made by flows that matched the expired entry as the ratio of the number of bytes matched against the expired entry to the duration of the flows that
matched the entry. However, there may be other active flows on the same link
that contribute to the total utilization. FlowSense uses information from PacketIn messages, which are triggered when a new flow arrives at a switch, to infer
which flows are active at a given time. To compute the utilization contribution of
these active flows, we must wait for them to expire and trigger FlowRemoveds.
Thus, we incur a delay in estimating the instant total utilization on a link at a
checkpoint. We evaluate the magnitude of this delay in Section 4.
Figure 1(right) illustrates an example scenario for our estimation of link utilization as above. In this example, f1 , f2 , and f3 are flows that start at times
t1 , t2 , and t3 , and t4 , t6 , t5 are the times at which those flows end; FlowSense
determines the start and end times based on PacketIn and FlowRemoved messages. If f1 , f2 and f3 had utilizations of 10, 20 and 40 MBps, then, when the
first FlowRemoved message arrives at t4 , FlowSense will know the utilization for
f1 by dividing the byte count from the FlowRemoved message by the duration of
the flow, and it also creates a checkpoint at t4 . When the FlowRemoved packet at
t5 arrives, flow f3 ends and its utilization of 40 MBps is recorded and added to
Polling
FlowSense
50
CDF of ports
Utilization (MBps)
60
40
30
20
10
0
0
50
100
150
Time Elapsed (sec)
200
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
All
90% util reported
0
2
4
6
8
10
12
Average time between checkpoints (sec)
Fig. 2. (left) Accuracy of utilization monitoring. We compare FlowSenses estimates with the values obtained by continually polling the switch counters at 1s intervals; (right) Granularity of utilization monitoring for all flows and for flows that
have 90% of their utilization reported after 10s. We assume flows are mapped to 24
distinct links.
Evaluation
We evaluate FlowSense from three perspectives: (1) how accurate are its utilization estimates?, (2) how often can it refresh its estimate for a links utilization?,
and (3) how quickly can it estimate the utilization at a specific time? To answer
these questions, we perform experiments using a small OpenFlow testbed and
simulations on a real-world enterprise trace.
4.1 Accuracy
To estimate the accuracy of utilization monitoring, we set up a small testbed
comprising two OpenFlow switches, A and B, that are connected to each other.
hostA is connected to A, and hostB1 and hostB2 to B. Initially, the rule tables
of the two switches are empty. When new flows arrive, we always add rules
with no hard timeout and a soft timeout of 1s. We use iperf to simultaneously
perform two data transfers from hostA to hostB1 and hostB2 for a period of three
minutes. The transfer from hostA to hostB2 has a constant rate of 10MBps, while
the transfer from hostA to hostB1 varies across three different rates over time:
20MBps, 45MBps, and 30MBps. Before changing the transfer rate, we briefly
interrupt the transfer for a little more than a second to allow the soft timeout
to expire and trigger FlowRemoved messages.
We compare the utilization obtained by FlowSense with that gathered from
continually polling A and B at 1s intervals. Figure 2(left) presents the results
obtained for the link connecting A and B. FlowSense reports utilization values
that are similar to those inferred through polling. In comparison to the values
obtained with polling, utilization measured with FlowSense shows a small shift
to the right because flow entry timeouts have a precision at the granularity of
seconds. Thus, it may take up to a second for FlowRemoved to trigger after a
timeout expires. Since FlowSense is only working with a single PacketIn and
FlowRemoved message per flow, it does not experience the same jittery behavior
as the polling method because its readings are an average utilization over that
flows lifetime.
4.2
Granularity
Staleness
To compute the total utilization at a checkpoint, FlowSense must wait for all
the flows active at the checkpoint to finish and trigger FlowRemoved messages.
For each checkpoint, we define the utilization wait time as the time until the
last active flow expires. Figure 3(left) shows the cumulative distribution of the
utilization wait times for each checkpoint in the trace described in Section 4.2,
where flows are assigned to one of 24 incoming links. The median utilization
wait time is 98s: for almost half of the checkpoints, FlowSense would have to
wait more than 100s to capture the complete utilization.
The long delay in computing the total utilization may be caused by active
flows that are very long but do not send a lot of traffic (e.g., ssh sessions). Next,
we show that if an application is willing to tradeoff some accuracy for timeliness,
it can have a reasonable estimate of a links utilization at a particular checkpoint
in under 10s, rather than having to wait for 100s. We compute how much of the
total utilization at a checkpoint is reported by FlowSense 1s, 5s, and 10s after
0.8
0.6
0.4
0.2
0.001 0.01 0.1
1
10 100 1000
Time until last active flow ends (s)
Fraction of checkpoints
Fraction of checkpoints
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
After 1 sec
After 5 sec
After 10 sec
20
40
60
80
% of utilization reported
100
Fig. 3. (left) Distribution of waiting times to compute the total utilization value at
every FlowRemoved event. (right) Utilization reported after 1s, 5s, and 10s following
the expiry of a flow entry. Around 70% of links have 90% or more of total utilization
reported after 10 seconds.
the checkpoint is created. Figure 3(right) shows that FlowSense reports around
60% of the total utilization for 50% of the checkpoints after 1s, and 90% of the
total utilization for 70% of the checkpoints after 10s.
The granularity of measurements does not decrease by much when considering only the 70% of checkpoints that capture 90% after 10s. The line labeled
90% util reported in Figure 2(right) shows the distribution of the average time
between these checkpoints. The median time is only around 1.7s (increasing from
1.1s when considering all checkpoints).
To summarize, FlowSense is able to refresh utilization less than every 2s
on average and obtain 90% of the total utilization at these refresh checkpoints
in under 10s. We are investigating ways to predict the utilization wait time
at each checkpoint. Such a prediction would give applications another knob to
tune measurement performance: if the wait time is too high, the application
could decide to trigger on-demand polling, thus trading off scalability for lower
measurement staleness.
Discussion
outs) so as to avoid triggering control traffic, and use wildcard rules to reduce
the amount of control traffic. We discuss next the applicability of FlowSense in
such scenarios.
Distributing the controller. Distributing the controller does not affect the
amount or frequency of control traffic. Using a mechanism similar to FlowVisor [9], FlowSense could still capture incoming control traffic and synchronize
the information gathered across controllers.
Proactive rules and large timeouts. When operators install rules proactively, new flows at a switch do not trigger PacketIns because they find a matching rule in the flow table. Further, if rules have large timeouts, they take long to
expire and trigger FlowRemoveds. Some entries may even be set up to never expire or to not trigger a FlowRemoved when they expire. In such scenarios, control
traffic is scarce or missing completely and polling switch counters for utilization
provides more frequent utilization estimates, albeit at the expense of network
overhead. For reactive applications that rely on traffic changes, they will have
to either rely on stale data or begin active polling as previously stated.
Wildcard rules. Wildcard rules limit the number of FlowRemoved messages
and forces us to resort to active solutions such as polling counters more often.
More importantly, certain wildcard rules can make the utilization computation
impossible. If a rule has a wildcard for the input port then the rule is not
associated with a single link. Thus, we cannot infer how the traffic that matches
against the rule is divided among the input ports to which the wildcard refers
to and we cannot compute utilization on the links that end in these input ports.
Conclusions
References
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
J. R. Ballard, I. Rae, and A. Akella. Extensible and scalable network monitoring using OpenSAFE. In
INM/WREN, 2010.
T. Benson, A. Akella, and D. Maltz. Network traffic characteristics of data centers in the wild. In ACM IMC,
2010.
Z. Cai, A. L. Cox, and T. E. Ng. Maestro: A System for Scalable OpenFlow Control. Technical Report TR11-07,
Rice University, 2011.
Genesis Hosting Solutions. http://www.nec.com/en/case/genesis/index.html.
IBM and NEC team up. http://www-03.ibm.com/press/us/en/pressrelease/36566.wss.
L. Jose, M. Yu, and J. Rexford. Online measurement of large traffic aggregates on commodity switches. In
USENIX Hot-ICE, 2011.
N. McKeown, T. Anderson, H. Balakrishnan, G. Parulkar, L. Peterson, J. Rexford, S. Shenker, and J. Turner.
OpenFlow: enabling innovation in campus networks. ACM Sigcomm CCR, 38:6974, March 2008.
Selerity. http://seleritycorp.com/.
R. Sherwood, G. Gibb, K.-K. Yap, G. Appenzeller, M. Casado, N. McKeown, and G. Parulkar. Can the production network be the test-bed. In USENIX OSDI, 2010.
Tervela. http://www.tervela.com/.
A. Tootoonchian, M. Ghobadi, and Y. Ganjali. OpenTM: Traffic Matrix Estimator for OpenFlow Networks. In
PAM, 2010.
M. Yu, J. Rexford, M. J. Freedman, and J. Wang. Scalable flow-based networking with DIFANE. In ACM
Sigcomm, 2010.