网络IO控制——Quality of Service

早上没吃饭,坐在公司里测试,等结果等的太无聊,翻译一下libvirt上的关于网络IO控制的一点内容。希望翻译完,就可以吃饭了。

原文如下:

  ...
  <devices>
    <interface type='network'>
      <source network='default'/>
      <target dev='vnet0'/>
      <bandwidth>
        <inbound average='1000' peak='5000' floor='200' burst='1024'/>
        <outbound average='128' peak='256' burst='256'/>
      </bandwidth>
    </interface>
  <devices>
  ...

This part of interface XML provides setting quality of service. Incoming and outgoing traffic can be shaped independently.

这部分XML提供QoS设置,incoming和outgoing事务可以被单独处理。(QoS其实就是网络IO控制,流量分为进入和流出的流量)

The bandwidth element can have at most one inbound and at most one outbound child elements.

bandwidth标签至多有一个inbound和一个outbound子标签。

Leaving any of these children element out result in no QoS applied on that traffic direction.

不设置哪个子标签,会导致在该事务方向上没有QoS服务的应用。

So, when you want to shape only domain's incoming traffic, use inbound only, and vice versa.

所以,当你只想要处理incoming事务,只使用inbound就可以了,反之亦然。

Each of these elements have one mandatory attribute average (or floor as described below).

每一个标签都有一个强制的属性average。

average specifies average bit rate on the interface being shaped. 

average指定了在interface上的平均的比特率。

Then there are two optional attributes: peak, which specifies maximum rate at which interface can send data, and burst, amount of bytes that can be burst at peak speed.

然后有两个可选的属性:peak,指定interface可以发送数据的最大速率(即峰值),burst,指定在峰值速度时能传送的最大数据量。

Accepted values for attributes are integer numbers. The units for average and peak attributes are kilobytes per second, and for the burst just kilobytes.

可接受的属性值必须是整数。average和peak的单位是kb/s,burst单位是kb.

Since 0.9.4 The inbound can optionally have floor attribute. This is there for guaranteeing minimal throughput for shaped interfaces.

从0.9.4版本开始,inbound又多了一个可选的属性floor,它的出现是为了保证interfaces的最小吞吐量。

This, however, requires that all traffic goes through one point where QoS decisions can take place.

但是,这个属性需要所有的事务都从QoS服务能够起作用的点(方向)通过。(不太明白这句话的意思)

That's why this attribute works only for virtual networks for now (that is <interface type='network'/> with a forward type of route, nat, or no forward at all).

这是为什么这个属性只能在虚拟网络中工作的原因。

Moreover, the virtual network the interface is connected to is required to have at least inbound QoS set (average at least). Moreover, with floor attribute users don't need to specify average. However, peak and burst attributes still require average.

而且,interface所连接的虚拟网络要求至少设置inbound(至少设置average),并且,如果设置floor的话,就不需要指定average了。然而,peak和burst属性仍然需要配置average.

Currently, linux kernel doesn't allow ingress qdiscs to have any classes therefore floor can be applied only on inbound and not outbound. Since 1.0.1

现在,linux内核不允许 ingress qdiscs 有任何的classes,所以floor只能在inbound中应用,而不能在outbound中应用。


晕,翻译完了,饭还没来,饿滴慌啊。。。。


评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值