Hi Xiao,
My comments below;
On Friday 01 July 2016 09:10 AM, Xiao Ma (xima2) wrote:
Hi,All
I want to use the QoS feature of OpenvSwitch to control the bandwidth based on
the vlan id(Scene 1) or port id(Scene 2).
So I deployed it as showed bellow,and configured the qos rules,the flows,and
used iperf tool to test it.
But the result is disappointment.
Scene 1:
+------------------------------------------------+
| |
| switch |
+-+-------------------------------------------+--+
| |
bond0 bond0
+---------------------|--------------------+
+-----------------|---------------------+
| host1 +-----------+ | | host2
+-----------+ |
| | | | | |
| |
| | ovsbr | | | | ovsbr
| |
| +-----------+ | |
+-----------+ |
| | ofport=1 | | |
|
| +-----------+ | |
+-----------+ |
| | br-int | | | | br-int
| |
| +-----------+ | |
+-----------+ |
| tag=1002 |tag=1038 | | |
| tag=1038 |
| | | | | tag=1002|
| |
| | | | | |
| |
| +----------------+ +-----------------+| | +---------------+
+---------------+ |
| |namespace | |namespace || | |namespace |
|namespace | |
| | | | || | | |
| | |
| | | | || | | |
| | |
| |10.10.12.2/24 | |192.168.4.2/24 || | |10.10.12.4/24 |
|192.168.4.3/24 | |
| |iperf -c | | || | |iperf -s |
| | |
| |10.10.12.4 -P 20| | || | | |
| | |
| | | | || | | |
| | |
| | | | || | | |
| | |
| | | | || | | |
| | |
| | | | || | | |
| | |
| | | | || | | |
| | |
| +----------------+ +-----------------+| | +---------------+
+---------------+ |
| | |
|
| | |
|
+------------------------------------------+
+---------------------------------------+
1)Set QoS:
ovs-vsctl set port bond0 qos=@qos -- --id=@qos create qos type=linux-htb\
queues:1=@queue_data \
queues:2=@queue_storage -- \
--id=@queue_data create queue other-config:min-rate=200000000
other-config:max-rate=200000000-- \
--id=@queue_storage create queue other-config:min-rate=800000000
other-config:max-rate=800000000
2)OVS in host1:
Flows of ovsbr:
priority=100,in_port=1,dl_vlan=1002 actions=set_queue:2,NORMAL
priority=50,in_port=1 actions=set_queue:1,NORMAL
priority=2,in_port=1 actions=drop
priority=1 actions=NORMAL
Flows of br-int:
priority=3,in_port=1,dl_vlan=1002 actions=mod_vlan_vid:1002,NORMAL
priority=2,in_port=1 actions=drop
priority=1 actions=NORMAL
Can you check "tc -s -d class show dev bond0" and see if the queues are
set on bond0? If so, the queue_ids will mostly be equal to n+1, n being
the value set in the queue table. From my understanding,
https://github.com/openvswitch/ovs/blob/master/lib/netdev-linux.c#L3924
does this.
What is the bandwidth that iperf shows when the packets are not shaped
(without queues)?
3)iperf -c 10.10.12.4 -P 20,but the result is not 800M
[root@host1 ~]# iperf -c 10.10.12.4 -i 1 -t 100 -P 20 |grep SUM
[SUM] 0.0- 1.0 sec 53.2 MBytes 446 Mbits/sec
[SUM] 1.0- 2.0 sec 51.0 MBytes 428 Mbits/sec
[SUM] 2.0- 3.0 sec 54.3 MBytes 455 Mbits/sec
[SUM] 3.0- 4.0 sec 50.9 MBytes 427 Mbits/sec
[SUM] 6.0- 7.0 sec 50.5 MBytes 424 Mbits/sec
[SUM] 7.0- 8.0 sec 51.3 MBytes 430 Mbits/sec
Scene 2:
+------------------------------------------------+
|
|
| switch
|
+-+-------------------------------------------+--+
| |
bond0
bond0
+---------------------|--------------------+
+-----------------|---------------------+
| host1 +----+------+ | | host2
+----+------+ |
| | | | | |
| |
| | ovsbr | | | |
ovsbr | |
| +---------+-+ | |
+----------++ |
| | | | | |
| |
| tag=1002| | tag=1038 | | |
| |
| type=inetrnal | type=internal | | tag=1002
|tag=1038 |
| ofport=4| | ofport=5 | | |
| |
| | | | | |
| |
| | | | | |
| |
| | | | | |
| |
| +------------+---+ +-----------------+| |
+--------+------+ +-+-------------+ |
| |namespace | |namespace || | |namespace
| |namespace | |
| | | | || | |
| | | |
| | | | || | |
| | | |
| |10.10.12.2/24 | |192.168.4.2/24 || | |10.10.12.4/24
| |192.168.4.3/24 | |
| |iperf -c | |iperf -c || | |iperf -s
| |iperf -s | |
| |10.10.12.4 -P 5 | |192.168.4.3 -P 50|| | |
| | | |
| | | | || | |
| | | |
| | | | || | |
| | | |
| | | | || | |
| | | |
| | | | || | |
| | | |
| | | | || | |
| | | |
| +----------------+ +-----------------+| |
+---------------+ +---------------+ |
| | |
|
| | |
|
+------------------------------------------+
+———————————————————+
1)Set QoS:
set port bond0 qos=@qos -- --id=@qos create qos type=linux-htb
queues:1=@queue_data queues:2=@queue_storage —
--id=@queue_data create queue other-config:min-rate=300000000
other-config:max-rate=1000000000
-- --id=@queue_storage create queue other-config:min-rate=400000000
other-config:max-rate=1000000000
2)OVS in host1:
Flows of ovsbr:
priority=1000,in_port=5 actions=set_queue:1,NORMAL
priority=1000,in_port=4 actions=set_queue:2,NORMAL
priority=900 actions=NORMAL
3)iperf -c 10.10.12.4 -N 5,the bandwidth is 940M
4)At the same time,iperf -c 192.168.4.3 -P 50,the bandwidth for 10.10.12.4 down
to 150M(not the min-rate).
[SUM] 94.0-95.0 sec 112 MBytes 939 Mbits/sec
[SUM] 95.0-96.0 sec 113 MBytes 950 Mbits/sec
[SUM] 96.0-97.0 sec 112 MBytes 938 Mbits/sec
[SUM] 97.0-98.0 sec 112 MBytes 938 Mbits/sec
[SUM] 98.0-99.0 sec 111 MBytes 935 Mbits/sec
[SUM] 99.0-100.0 sec 112 MBytes 941 Mbits/sec
[SUM] 100.0-101.0 sec 73.6 MBytes 617 Mbits/sec
[SUM] 101.0-102.0 sec 18.6 MBytes 156 Mbits/sec (⭐️)
[SUM] 102.0-103.0 sec 17.1 MBytes 144 Mbits/sec
[SUM] 103.0-104.0 sec 18.6 MBytes 156 Mbits/sec
[SUM] 104.0-105.0 sec 17.8 MBytes 150 Mbits/sec
Could anybody help me find why and how to solve it ?
Any help in this regard will be appreciated.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev