[ovs-discuss] rate limiting is not working on Openvswitch
ANAND AKELLA
ava6951 at rit.edu
Thu Mar 8 18:53:30 UTC 2012
Hi Gurucharan,
Thanks for the information. I'm facing issue in executing the following
command.
praveen at ubuntu:~$ sudo ovs-ofctl add-flow br0 actions=NORMAL
ovs-ofctl: br0 is not a bridge or a socket
I was able to set the qos enqueue commands as specified in the below email.
sudo ovs-vsctl -- set port br0 qos=@newqos -- --id=@newqos create qos
type=linux-htb other-config:max-rate=900000000 queues=0=@q0,1=@q1,2=@q2 --
--id=@q0 create queue other-config:min-rate=720000000
other-config:max-rate=900000000 -- --id=@q1 create queue
other-config:min-rate=0 other-config:max-rate=90000000 -- --id=@q2 create
queue other-config:min-rate=0 other-config:max-rate=90000000
praveen at ubuntu:~$ sudo ovs-vsctl list port
_uuid : 67446d56-0ea8-4435-9fca-d2439da05872
bond_downdelay : 0
bond_fake_iface : false
bond_mode : []
bond_updelay : 0
external_ids : {}
fake_bridge : false
interfaces : [0589fbc0-2016-4283-bd5f-bcc2850ec1ae]
lacp : []
mac : []
name : "br0"
other_config : {}
qos : e6b6f69d-f05a-42f9-9c34-5b7dc0f910c9
statistics : {}
status : {}
tag : []
trunks : []
vlan_mode : []
_uuid : a567d1e7-a62f-44af-a055-6e68e47a44f6
bond_downdelay : 0
bond_fake_iface : false
bond_mode : []
bond_updelay : 0
external_ids : {}
fake_bridge : false
interfaces : [b58a58b4-fdc5-42fd-8f0f-0e06e74ed50d]
lacp : []
mac : []
name : "tap1"
other_config : {}
qos : []
statistics : {}
status : {}
tag : []
trunks : []
vlan_mode : []
_uuid : cdbe361f-0413-4a64-9777-8a3196944d27
bond_downdelay : 0
bond_fake_iface : false
bond_mode : []
bond_updelay : 0
external_ids : {}
fake_bridge : false
interfaces : [5162c347-5afc-413e-bb08-205104990022]
lacp : []
mac : []
name : "tap0"
other_config : {}
qos : []
statistics : {}
status : {}
tag : []
trunks : []
vlan_mode : []
praveen at ubuntu:~$
Here is my topology
eth0 and br0 is bridged. br0 has ip address of 192.168.2.8.
I have created a virtual interfaces tap0 and tap1 and bridge br0 by editing
/etc/network/interfaces. I have created a VM and bridge it with tap0 using
virtual box software. The new VM is assigned ip address 192.168.2.10. The
topology is similar to the qos rate limiting specified in webpage
http://openvswitch.org/support/config-cookbooks/qos-rate-limiting/ .
I added the bridge to vswitch using the following commands.
praveen at ubuntu:~$ sudo ovs-vsctl list-ports br0
eth0
tap0
tap1
I have tried to apply the command I dont see the traffic is getting rate
lhanimited.
ovs-vsctl set Interface tap0 ingress_policing_rate=1000
ovs-vsctl set Interface tap0 ingress_policing_burst=100
Thanks,
Anand
On Wed, Mar 7, 2012 at 7:23 PM, Gurucharan Shetty <gshetty at nicira.com>wrote:
> On Wed, Mar 7, 2012 at 3:59 PM, ANAND AKELLA <ava6951 at rit.edu> wrote:
> > Hi,
> >
> > We are trying to setup the experiment to perform QoS rate limiting using
> > OpenV Switch and following the steps provided in the cookbook.
> > We are able to connect a VM to tap interface and configured the
> ovs-vsctl
> > command to perform rate limiting on tap interfaces.
> > We also enabled ingress tc qdisc add dev tap0 (traffic control) but
> > we don't see the traffic being rate limited when applied on tap
> interfaces
> > I'm trying to send traffic using netperf ,the effective throughput
> remains
> > the same in the ingress and egress even after applying qos rate limiting
> on
> > taps interfaces.
> >
> > We have hit a roadblock and do not know in which direction to proceed in
> > order to resolve the issue.
> >
> > Any help in this regard will be appreciated.
>
>
> This is not the exact thing that you are asking for and someone else
> may help you here. But have you tried rate limiting at the physical
> interface side of the bridge? I had tried a few days ago and it had
> worked for me. You can reduce the rate limiting to less than 100 mbps
> and it should work fine from the VMs too.
>
> I am copy-pasting my notes and setup details:
> 2 ubuntu 11.04 machines:
> client1: Has eth1 and br0. IP address of br0 is 192.168.1.1
>
> client2: Has eth1, eth1:1, eth1:2 with 192.168.1.2, 192.168.1.3,
> 192.168.1.4
>
> In Client1:
> sudo ovs-vsctl clear Port eth1 qos
> sudo ovs-ofctl del-flows br0
> sudo ovs-ofctl add-flow br0 actions=NORMAL
>
> sudo ovs-ofctl show br0 : This will give me the port numbers for the
> enqueue action.
>
> #Add tc root and classes
> sudo ovs-vsctl -- set port eth1 qos=@newqos \
> -- --id=@newqos create qos type=linux-htb
> other-config:max-rate=900000000 queues=0=@q0,1=@q1,2=@q2 \
> -- --id=@q0 create queue other-config:min-rate=720000000
> other-config:max-rate=900000000 \
> -- --id=@q1 create queue other-config:min-rate=0
> other-config:max-rate=90000000 \
> -- --id=@q2 create queue other-config:min-rate=0
> other-config:max-rate=90000000
>
> #Add ofctl rules
> sudo ovs-ofctl add-flow br0
>
> priority=65500,in_port=LOCAL,dl_type=0x0800,nw_src=ANY,nw_dst=192.168.1.2,actions=enqueue:2:0
> sudo ovs-ofctl add-flow br0
>
> priority=65500,in_port=LOCAL,dl_type=0x0800,nw_src=ANY,nw_dst=192.168.1.3,actions=enqueue:2:1
> sudo ovs-ofctl add-flow br0
>
> priority=65500,in_port=LOCAL,dl_type=0x0800,nw_src=ANY,nw_dst=192.168.1.4,actions=enqueue:2:2
>
> #You need 3 netservers in client2 on 3 different IP addresses(or not).
> #From client1:
> netperf -H 192.168.1.2[3,4] -c -C -l 100
>
> gshetty at ubuntu-client1:~$ sudo tc class show dev eth1
> class htb 1:fffe root rate 900000Kbit ceil 900000Kbit burst 1462b cburst
> 1462b
> class htb 1:1 parent 1:fffe prio 0 rate 720000Kbit ceil 900000Kbit
> burst 1530b cburst 1462b
> class htb 1:2 parent 1:fffe prio 0 rate 12000bit ceil 90000Kbit burst
> 1563b cburst 1563b
> class htb 1:3 parent 1:fffe prio 0 rate 12000bit ceil 90000Kbit burst
> 1563b cburst 1563b
>
>
> gshetty at ubuntu-client1:~$ sudo ovs-ofctl dump-flows br0
> NXST_FLOW reply (xid=0x4):
> cookie=0x0, duration=1622.813s, table=0, n_packets=2481225,
> n_bytes=163926423, actions=NORMAL
> cookie=0x0, duration=1620.652s, table=0, n_packets=23289,
> n_bytes=851884578, priority=65500,ip,in_port=65534,nw_dst=192.168.1.3
> actions=enqueue:2q1
> cookie=0x0, duration=1620.643s, table=0, n_packets=23280,
> n_bytes=857831536, priority=65500,ip,in_port=65534,nw_dst=192.168.1.4
> actions=enqueue:2q2
> cookie=0x0, duration=1620.66s, table=0, n_packets=390053,
> n_bytes=15880543962,
> priority=65500,ip,in_port=65534,nw_dst=192.168.1.2 actions=enqueue:2q0
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openvswitch.org/pipermail/ovs-discuss/attachments/20120308/4542f1b4/attachment.html>
More information about the discuss
mailing list