[ovs-dev] Flow Control and Port Mirroring

Simon Horman horms at verge.net.au
Thu Oct 28 11:54:04 UTC 2010


Hi,

I have observed what appears to be a flow control problem when I enable
port mirroring.

I have set up a kvm guest using virtio with VhostNet.
But the host and the guest are running 2.6.36-rc6.
I am using openvswitch v1.1.0pre2 and I have set up mirroring
such that all packets in and out of the tap device associated
with the guest are mirrored to dummy0 in the host.

Without mirroring I observe the following:

# netperf -c -4 -t UDP_STREAM -H 172.17.60.218 -l 30 -- -m 1472
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 172.17.60.218 (172.17.60.218) port 0 AF_INET
Socket  Message  Elapsed      Messages                   CPU      Service
Size    Size     Time         Okay Errors   Throughput   Util     Demand
bytes   bytes    secs            #      #   10^6bits/sec % SU     us/KB

114688    1472   30.01     2439876      0      957.3     31.29    2.677 
129024           30.01     2439876             957.3     -1.00    -1.000

With mirroring I observe:

# netperf -c -4 -t UDP_STREAM -H 172.17.60.218 -l 30 -- -m 1472
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 172.17.60.218 (172.17.60.218) port 0 AF_INET
Socket  Message  Elapsed      Messages                   CPU      Service
Size    Size     Time         Okay Errors   Throughput   Util     Demand
bytes   bytes    secs            #      #   10^6bits/sec % SU     us/KB

114688    1472   30.01     6266440      0     2458.7     99.37    8.503 
129024           30.01     2440047             957.4     -1.00    -1.000

What is of interest to me is that with mirroing the guest
is able to send ~2.5Gbits/s and consume ~100%cpu. Presumably
the sending of packets is CPU bound.

My reasoning is that in the non-mirroring case the guest is
limited by the external interface through wich the packets
eventually flow - that is 1Gbit/s. But in the mirrored either
there is no flow control or the flow control is acting on the
rate of dummy0, which is essentailly infinate.

Before investigating this any further I wanted to ask if
this behaviour is intentional.





More information about the dev mailing list