Question about link utilization

697 views
Skip to first unread message

Theano S.

unread,
Jun 29, 2015, 2:51:07 AM6/29/15
to sflo...@googlegroups.com
Hello,

I'd like to know about how the link utilization is calculated. I am using Mininet (with the OpenDaylight controller), and I have set all my links to have a bandwidth of 20Mbps. I am generating traffic using iperf.

When I send data from one host to another only (i.e., the rest of the network is idle), iperf claims it is sending about 2.4Mb per second, or about 12% . When I examine ifoututilization for an interface on that path, for example the switch interface which is linked to the destination host, sFlow-RT shows a link utilization of around 0.2.

I thought initially that this was a percentage of the link's total capacity, but that doesn't match with what iperf says. What does the 0.2 correspond to, then?

Thanks in advance!
Toni. 

Peter Phaal

unread,
Jun 29, 2015, 3:25:10 AM6/29/15
to sflo...@googlegroups.com, theano...@gmail.com
Link speeds in Mininet are implemented using Linux qdisc to rate limit traffic. The rate limits aren't reflected in the sFlow ifspeed field, so utilizations aren't correctly implemented. You need to take the measured data rates and calculate utilizations yourself by dividing by the 20Mbps bandwidth.

There are a number of ways of getting bandwidth. You can use sFlow counter data (ifinoctets, ifoutoctets). When you query these metrics you get a rate (i.e. octets / second). The following article describes how to query metrics:


A faster way to calculate link statistics is to use packet samples:


Define a flow with {value:'bytes'} and this will give you a value equivalent to ifinoctets (for ingress sampled sFlow), but that tracks faster than the ifinoctets counter.

To calculate utilization, take the octets/second metric, multiply by 8 to get bits per second and divide by the Mininet rate limit (20,000,000).

Theano S.

unread,
Jun 29, 2015, 10:01:43 AM6/29/15
to sflo...@googlegroups.com, theano...@gmail.com
Thanks, Peter, that was very helpful and I was able to get results consistent with iperf.

I'd like to know more about which metrics are sampled vs. counted and what the metrics mean, e.g., how they are computed. I didn't see anything in the sFlow v5 spec, but I only did a quick search; is that where I'd need to look?

Neil Mckee

unread,
Jun 29, 2015, 1:30:43 PM6/29/15
to sflo...@googlegroups.com

Counters always appear automatically in the list of metrics in sFlowRT (/metrics/html).  The only metrics appearing there that are sampled are the ones defined in the list of flows (/flow/html).  One can think of defining a flow as adding a special metric which will update more quickly and has more structure behind it ( top-keys, etc).


Browsing the specs is a good way to see what else you can get (http://sflow.org/developers/structures.php).  The combination of polled counters and 1:N random-samples is core to sFlow and repeats in other agent types.  For example Apache mod-sflow sends counters for method and status variants,  but also samples transactions with URL, XFF, duration, etc.  (and you can get the same standard feed from nginx, F5, A10, tomcat...).


Neil

Theano S.

unread,
Jul 1, 2015, 11:04:31 AM7/1/15
to sflo...@googlegroups.com
Thank you, I read the specs and it cleared up a lot.

I do have a question about the counters being polled--are they OpenFlow counters or are they maintained by sFlow?

Neil Mckee

unread,
Jul 1, 2015, 2:18:13 PM7/1/15
to Theano S., sflo...@googlegroups.com
These are sFlow counters -- sent by the sFlow agent running in the Open vSwitch.   There are some fields that help you map between the sFlow agentIP/ifIndex world and the OpenFlow dpid/ofport world,  but the data is standard sFlow.

So this way you can define your OpenFlow forwarding rules,  grouping traffic and wildcarding according to policy,  without losing the full-detail, real-time traffic visibility that you get from sFlow.   It's helpful to keep this separation between monitoring and control:  if you tried to do the same thing using only the OpenFlow counters then you would end up with huge forwarding tables just to get granular visibility.  That would impact switch performance, and the data would still be delayed.

Neil


--
You received this message because you are subscribed to the Google Groups "sFlow-RT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sflow-rt+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages