Hi all,
I have OpenVSwitch installed on one
computer which has a quad-port. I have two other computers connected to
two ports eth4 and eth5. I have eth4 connected to openflow port 2 and
eth5 connected to openflow port 1. I created 3 queues at eth5. If I set the
min-rate and max-rate to be equal for each queue, then I get the desired output
i.e all the queues output is at the configured rate but when I set the min-rate
and max-rate different, the total rate gets divided equally for all queues. Why
does it happen so?
I have used a python script to create the queues and form the flow table. I
have attached the python script.
After creating the queues and flow-table,
ovs-vsctl list queue gives:
_uuid : c0ecb2ca-d160-47e0-8aa6-706a16e0dee4
dscp : []
external_ids : {}
other_config : {max-rate="1000000000", min-rate="500000000"}
_uuid : b185925f-5d54-475f-99f7-7f7b4494ec7b
dscp : []
external_ids : {}
other_config : {max-rate="1000000000", min-rate="166666666"}
_uuid : d159b297-819d-4bf2-8b89-7c004f9e8870
dscp : []
external_ids : {}
other_config : {max-rate="1000000000", min-rate="333333333"}
ovs-ofctl dump-flows br0 gives:
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=565.288s, table=0, n_packets=6, n_bytes=360,
idle_age=367, priority=0,in_port=2 actions=output:1
cookie=0x0, duration=565.291s, table=0, n_packets=2976099, n_bytes=185344448,
idle_age=132, in_port=1 actions=output:2
cookie=0x0, duration=565.298s, table=0, n_packets=481851, n_bytes=7782220630,
idle_age=351, priority=1,tcp,in_port=2,tp_dst=6005 actions=enqueue:1q1
cookie=0x0, duration=565.294s, table=0, n_packets=482898, n_bytes=7783469380,
idle_age=352, priority=1,tcp,in_port=2,tp_dst=6010 actions=enqueue:1q2
cookie=0x0, duration=565.301s, table=0, n_packets=551341, n_bytes=7724940986,
idle_age=352, priority=1,tcp,in_port=2,tp_dst=6000 actions=enqueue:1q0
When I use 3 server-client pairs and enqueue traffic from each client to a
separate queue, at the server side I get the rates 308 Mbps, 310 Mbps and 310
Mbps for the 3 server-client pairs. If I just use two clients and generate
traffic, then I get the rates 462 Mbps and 473 Mbps. According to the concept
of HTB, the min-rates should be assigned and the excess bandwidth should be
divided in proportion of their rates. Then, why is the max-rate getting equally
divided? Am I wrong in understanding HTB? Pls help me.
Thank you
Regards,
Mathumitha
import sys
import subprocess
subprocess.call('ovs-vsctl clear port eth5 qos',shell=True)
subprocess.call('ovs-ofctl del-flows br0',shell=True)
n=int(sys.argv[1])
w=[None]*n
for i in range(n):
w[i]=int(sys.argv[i+2])
c=int(sys.argv[n+2])
sum=0
for i in range(n):
sum=sum+w[i]
r=[None]*n
for i in range(n):
r[i]=(w[i]*c)/sum
str1=""
for i in range(n-1):
str1=str1+str(i)+"=@q"+str(i)+","
str1=str1+str(n-1)+"=@q"+str(n-1)
str2=""
for i in range(n):
str2=str2+" -- --id=@q"+str(i)+" create queue other-config:min-rate="+str(r[i])+" other-config:max-rate="+str(c)
command1='ovs-vsctl -- set port eth5 qos=@newqos -- --id=@newqos create qos type=linux-htb other-config:max-rate='+str(c)+' queues='+str1+" "+str2
subprocess.call(command1,shell=True)
for i in range(n):
subprocess.call('ovs-ofctl add-flow br0 "in_port=2,dl_type=0x0800,nw_proto=6,tp_dst='+str(6000+5*i)+',priority=1,actions=enqueue:1:'+str(i)+'"',shell=True)
subprocess.call('ovs-ofctl add-flow br0 "in_port=1,actions=output:2"',shell=True)
subprocess.call('ovs-ofctl add-flow br0 "in_port=2,priority=0,actions=output:1"',shell=True)
_______________________________________________
discuss mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/discuss