[libvirt-users] How can a bridge be optimized?

Dennis Jacobfeuerborn dennisml at conversis.de
Mon Jun 11 22:55:48 UTC 2012


On 06/11/2012 09:28 PM, Whit Blauvelt wrote:
> On Mon, Jun 11, 2012 at 07:22:48PM +0300, Henrik Ahlgren wrote:
>> On 06/11/2012 06:34 PM, Whit Blauvelt wrote:
>>> Looking into background info on these, it looks like SR-IOV capability is
>>> specific to certain NICs and not documented for KVM/libvirt in any obvious
>>> place. Maybe I just didn't find it.
>>
>> I think SR-IOV is more for high-end 10 GigE networks; with 1 GigE NICs
>> and fairly modern hardware you should get decent performance (almost
>> wire-speed) with just simple virtio + bridge setup.
>>
>> Also, make sure you have the vhost_net module loaded (or kernel compiled
>> with CONFIG_VHOST_NET=y), recent (0.9.0 and newer I believe?) libvirt
>> versions should detect it and enable vhost=on with QEMU/KVM
>> automatically. That should give you some further performance boost.
>>
>> I agree that there is some room for improvement in libvirt documentation
>> regarding the network configuration.
> 
> Thanks. Not sure if I have the invocation or prerequisites right. If I do
> 
>     <interface type='bridge'>
>       <mac address='00:16:36:89:65:2e'/>
>       <source bridge='br0'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
>       <model type='virtio'/>
>     </interface>
> 
> I get around 150Mb, (on a Gb interface). But then its still showing as
> "-device rtl8139" on the host. Should that be? What are the minimum versions
> of stuff for virtio to work for this? Virtio's getting passed through for
> memballoon (from XML in the form "<memballoon model='virtio'>") so it's
> there.
> 
> If I take out that "address type" line throughput drops to around 100Mb. I
> do have vhost_net loaded now on the host (didn't before). Another VM on the
> same host with no virtio line tests even slower.
> 
> So far in our instance slow hasn't been bad. The VMs haven't needed more for
> their purposes. But now we're wanting to run a few where IO requirements are
> higher, thus my interest in tuning this.

How exactly do you test the bandwidth (tools) and do you only test the
connection to an external machine or have you also tested the bandwidth
between guest and host and this guest and another one on the same host?

Regards,
  Dennis




More information about the libvirt-users mailing list