答复: [PATCH 1/1] virsh: inherit qos from network definition when attaching an interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Michal,

	Thank you for the explanation. I misunderstood the setting QoS on the bridge and interfaces.
I will try to use ovs-vsctl to set up bandwidth when using an OVS bridge.

-------
Best Regards,
Jinsheng Zhang

-----邮件原件-----
发件人: Michal Prívozník [mailto:mprivozn@xxxxxxxxxx] 
发送时间: 2021年11月1日 23:56
收件人: jx8zjs; libvir-list@xxxxxxxxxx
抄送: Norman Shen(申嘉童); Jinsheng Zhang (张金生)-云服务集团
主题: Re: [PATCH 1/1] virsh: inherit qos from network definition when attaching an interface

On 11/1/21 8:52 AM, jx8zjs wrote:
> Fix bug 1826168: bridge type network with ovs bridge can start with 
> Qos setting which do not take any effect
> 
> Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=1826168
> Signed-off-by: jx8zjs <jx8zjs@xxxxxxx>
> ---
>  tools/virsh-domain.c | 34 +++++++++++++++++++++++++++++++---
>  1 file changed, 31 insertions(+), 3 deletions(-)

I don't think this is right. The bug is about setting QoS on the bridge itself not TAP devices plugged into it. From the bug, this is the QoS
setting:

 <bandwidth> 
   <inbound average='1000' peak='5000' burst='5120'/>
   <outbound average='128' peak='256' burst='256'/>  </bandwidth>

And this is the resulting tc setting:

# tc qdisc show dev virbr0
qdisc htb 1: root refcnt 2 r2q 10 default 0x2 direct_packets_stat 0 direct_qlen 1000 qdisc sfq 2: parent 1:2 limit 127p quantum 1514b depth 127 divisor 1024 perturb 10sec qdisc ingress ffff: parent ffff:fff1 ---------------- 

# tc class show dev virbr0
class htb 1:1 root rate 8Mbit ceil 40Mbit burst 1600b cburst 1600b class htb 1:2 parent 1:1 leaf 2: prio 0 rate 8Mbit ceil 40Mbit burst 5Mb cburst 1600b 

# tc filter show dev virbr0
filter parent 1: protocol all pref 1 fw chain 0 filter parent 1: protocol all pref 1 fw chain 0 handle 0x1 classid :1

# tc filter show dev virbr0 ingress
filter parent ffff: protocol all pref 49152 u32 chain 0 filter parent ffff: protocol all pref 49152 u32 chain 0 fh 800: ht divisor 1 filter parent ffff: protocol all pref 49152 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid :1 not_in_hw
  match 00000000/00000000 at 0
 police 0x1 rate 1024Kbit burst 256Kb mtu 64Kb action drop overhead 0b 
        ref 1 bind 1


what this does is when there's an <interface/> from this network (without its own QoS) in a guest, it is rate limited by default.
Moreover, if there are two interfaces, with no QoS set, then they share the same rate, which means in this case that they both share 1mbps bandwidth. It does NOT mean that each <interface/> has its own 1mbps bandwidth to spare. The only way to achieve this behaviour is to set QoS on the bridge itself and not individual interfaces.

Michal





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux