[libvirt] traffic control on hypervisor

yue libvirt at 163.com
Sat Jan 11 03:06:34 UTC 2014

hi, Michal Privoznik

i am a bit confusion about type of vm's interface . 
<interface type='network'> and <interface type='bridge'>
do the Qos in libvirt can apply to both case?


At 2014-01-10 17:45:23,"Michal Privoznik" <mprivozn at redhat.com> wrote:

>On 10.01.2014 09:37, yue wrote:
>> hi,all
>> if we can control the bandwidth of vm at hypervisor level?
>> i know linux tc command  can control traffic, but it is at ISO level 3, 
>> vm;s network is on bridge at level 2.
>> how libvirt implement traffic control over vm?
>> thanks
>I'm not sure the linux traffic shaper works on layer 3. I'd say linux
>inserts a new layer (called "queuing layer") in between layers 2 and 3
>just to allow traffic shaping on bridges too. Hence, there's no need for
>libvirt to treat bridges differently than the rest of devices when it
>comes to traffic shaping (e.g. TUN/TAP device). If your bridge is
>managed by libvirt, you can insert a simple XML snippet to corresponding
>network configuration, e.g.:
> <bandwidth>
>    <inbound average='1000' peak='5000' burst='5120'/>
>    <outbound average='128' peak='256' burst='256'/>
>  </bandwidth>
>Same applies for each domain's interface:
>     <bandwidth>
>        <inbound average='1000' peak='5000' floor='200' burst='1024'/>
>        <outbound average='128' peak='256' burst='256'/>
>      </bandwidth>
>If you're interested in implementation details I'd suggest to dive into
>Libvirt creates rather a complex tree of qdiscs (things get complicated
>once a device hotplug is allowed). But there's nearly a page comment
>with a picture showing what's going on.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140111/9052acbd/attachment-0001.htm>

More information about the libvir-list mailing list