Quantcast
Channel: 钻戒 and 仁豆米
Viewing all articles
Browse latest Browse all 290

KVM的虚机如何限速

$
0
0

需要开一台kvm的测试机,但是需要限制速度,10M
我们的物理机使用了bridge,以及vlan tag,所以虚机的网卡是br0.141

查了一圈文档

    <interface type='bridge'>
      <mac address='52:54:00:db:4c:5f'/>
      <source bridge='br0.141'/>
      <bandwidth>
        <inbound average='1250' peak='1250' burst='1250'/>
        <outbound average='1250' peak='1250' burst='1250'/>
      </bandwidth>
      <model type='virtio'/>

注意限速的单位:是kilobyte per second
那么:
1250 kilobyte per second, KB/s = 10 Mbps = 1.25 MB/s

10 Mbps就是通常意义上的网速,/8=1.25 MB/s,就是机器上用下载软件比如迅雷下载,看到的速度(1.25 MB/s)。


Viewing all articles
Browse latest Browse all 290

Trending Articles