sFlow-RT maintains a flow cache per switch port. The size of this
cache is a function of the n: value in the flow definition (a maximum
value of 20 is allowed). The activeFlows query accumulates data from
all the individual flow caches and so can return more than 20 results,
but a flow will not be represented unless it is in the top n in at
least one interface.
Why do you need to see all the flows to load balance properly? If you
define a flow with no keys, but with bytes as the value, you will get
a real-time view of the total traffic flowing in each port. If the
loads are unbalanced then you can look for large flows to move.
Unbalanced loads tend to be the result of large "Elephant" flows:
http://blog.sflow.com/2013/02/sdn-and-large-flows.html
If the traffic consists of many small flows then the hash based load
balancing mechanism used by OVS (and by physical switches) to balance
traffic across ECMP / LAG groups will generally be effective.
The following article includes a demonstration of large flow load balancing:
http://blog.sflow.com/2015/06/leaf-and-spine-traffic-engineering.html
The sFlow-RT Fabric View application gives an idea of the type of
analytics that you might want to use for load balancing:
http://blog.sflow.com/2015/10/fabric-view.html
Are you using Open vSwitch with Mininet? If so, you might want to look
at the following example as well:
http://blog.sflow.com/2015/01/hybrid-openflow-ecmp-testbed.html
Thanks for the answer again,sFlow-RT maintains a flow cache per switch port. The size of this
cache is a function of the n: value in the flow definition (a maximum
value of 20 is allowed). The activeFlows query accumulates data from
all the individual flow caches and so can return more than 20 results,
but a flow will not be represented unless it is in the top n in at
least one interface.Well, actually I want to know only the flows that go to some specific output. So the maximum I can monitor is 20? Is there a way I can see more ? I will explain below in the next paragraph why.
Well the problem is that I did not explain you how do I do load balancing. I don't want to load balance in the switch. The idea is to combine a SDN switch with regular cisco routers. I am not using mininet, I have my own setup with switches and routers. Lets say I have the following topology (it can be extended to something more complex between the two switches):H1 -- Switch 1---- router1 ----- router 2 -----switch 2-----H2.Between the router1 and router 2 there are 4 interfaces with the same cost so they use ECMP. The idea behind my project is to loadbalance between the two routers, the problem with ECMP is that depending on the flows and if they are not a lot it can give poor results. What I am doing is the following I am monitoring whats happening between the two routers with netflow, so I know through which interface each flow goes. What I do with the OVS switch is to modify the header of some packets in the switch 1 so they go through the link I want to, and then at switch 2 i restore the original header and H2 will not notice any difference. With that approach I can reach 25%, 25%, 25%, 25% or 100%,0,0,0, whatever I want thats the good thing. However, the problem is that with netflow I can get flow data every minute and thats so bad because I can only load balance big flows, and also 1 minute or more late.So reading your blog I saw sFlow and I wanted to combine everything together: with netflow I learn to which link evey flow goes so I learn how to move them, then to read the % of each link between the routers I use SNMP and I read the counters every second. And finally my idea was to use sFlow to learn flows sizes and headers much faster than with netflow. Is that clear or I confused you ?
Thanks for the additional details - I have added comments inline.
On Tuesday, December 1, 2015 at 4:58:50 PM UTC-8, Richard Mayers wrote:Thanks for the answer again,sFlow-RT maintains a flow cache per switch port. The size of this
cache is a function of the n: value in the flow definition (a maximum
value of 20 is allowed). The activeFlows query accumulates data from
all the individual flow caches and so can return more than 20 results,
but a flow will not be represented unless it is in the top n in at
least one interface.Well, actually I want to know only the flows that go to some specific output. So the maximum I can monitor is 20? Is there a way I can see more ? I will explain below in the next paragraph why.I am still not sure why you need more than 20 flows per vNIC.If you are trying to reconcile the data with NetFlow, then you could enable logging and you will see all the flows that sFlow-RT sees (not just the top 20).
Well the problem is that I did not explain you how do I do load balancing. I don't want to load balance in the switch. The idea is to combine a SDN switch with regular cisco routers. I am not using mininet, I have my own setup with switches and routers. Lets say I have the following topology (it can be extended to something more complex between the two switches):H1 -- Switch 1---- router1 ----- router 2 -----switch 2-----H2.Between the router1 and router 2 there are 4 interfaces with the same cost so they use ECMP. The idea behind my project is to loadbalance between the two routers, the problem with ECMP is that depending on the flows and if they are not a lot it can give poor results. What I am doing is the following I am monitoring whats happening between the two routers with netflow, so I know through which interface each flow goes. What I do with the OVS switch is to modify the header of some packets in the switch 1 so they go through the link I want to, and then at switch 2 i restore the original header and H2 will not notice any difference. With that approach I can reach 25%, 25%, 25%, 25% or 100%,0,0,0, whatever I want thats the good thing. However, the problem is that with netflow I can get flow data every minute and thats so bad because I can only load balance big flows, and also 1 minute or more late.So reading your blog I saw sFlow and I wanted to combine everything together: with netflow I learn to which link evey flow goes so I learn how to move them, then to read the % of each link between the routers I use SNMP and I read the counters every second. And finally my idea was to use sFlow to learn flows sizes and headers much faster than with netflow. Is that clear or I confused you ?The setup you describe is very similar to the segment routing load balancer I mentioned:In the segment routing case, the ingress top of rack switch is used to add MPLS labels to selected flows. In your case, you could use Open vSwitch to add the MPLS labels, the net result would be the same.Flows don't need to correspond to TCP connections, you could define them to group traffic between pairs of hypervisors, subnets, etc. As a practical matter trying to act on small flows doesn't scale because there are too many, you need to group traffic into a smaller number of larger flows.Since you are using simulated Cisco devices (dynamips), would it be possible to add sFlow export? Cisco Nexus 9k/3k switches support sFlow. The poor visibility offered by SNMP and NetFlow is going to make load balancing impractical with realistic workloads. The primary issue is the latency that these technologies add to the measurements.
Comments inline.
I should also note that sFlow-RT is designed to identify large flows.
The activeflows query returns the largest N flows. If you have a flat
distribution with hundreds of equal size flows then activeflows will
just return a random selection of flows.
> 4) In one of my previous messages I told you that ovs crashed, so actually
> doing my tests with the 200 flows I am talking about during this message, it
> crashed again. How can it be possible ? The flows are quite small and before
> enabling the sFlow agent it never happened, and I was sending more flows
> than 200...
What version of Open vSwitch are you using? I would recommend using
the latest version since there have been significant performance and
stability enhancements in the last couple of years.
Hi peter,
Thank you for all your previous answers, they were pretty useful !
Thanks Peter it worked. But I have one more question. Can you please tell how this dashboard can be accessed as shown in the screenshot?
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/sflow-rt/a008b882-5d4a-446b-b860-a6fa13b96ae5%40googlegroups.com.