各种模式虚拟化的网络性能对比测试

dpdk+ovs 与 物理机 与 sriov(pci passthrough) 纯粹的linux bridge的性能对比

CPU E5-2680V2 2.8G,网卡 ixgbe intel 82599。

模式/并发-----pps204080
物理机9.7W17.3W16.5W
dpdk + ovs + vhost-user 18.5W30.8W48W
sriov(pci passthrough)17.5W29W48W
linux-bridge10W 16.7W20W

测试方法:路由转发

结构为:A------R------B

实际上R有两块网卡,有4个方向的数据包,本测试只取其中之一,同时使用了LINUX的路由功能做测试,所以不做为各种技术的基准测试参考,只是一个相对值。

A做netserver,R替换为以上各种模式的机器,B做netperf的客户端

分别使用netperf做20、40、80并发并绑定CPU进行TCP_RR测试。

dpdk-ovs-vhost-user的xml:

<domain type='kvm'>
  <name>vm1</name>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <hugepages>
      <page size='1024' unit='M' nodeset='0'/>
    </hugepages>
  </memoryBacking>
  <cpu mode='host-model'>
    <model fallback='allow'/>
    <numa>
      <cell id='0' cpus='0-1' memory='4194304' unit='KiB' memAccess='shared'/>
    </numa>
  </cpu>
  <vcpu placement='static' current='2'>16</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/home/vm_workspace/vm1.qcow2'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>

    <interface type='vhostuser'>
      <mac address='52:54:00:00:06:00'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user-0' mode='client'/>
       <model type='virtio'/>
      <driver name='vhost' queues='2'>
        <host mrg_rxbuf='on'/>
      </driver>
    </interface>
    <interface type='vhostuser'>
      <mac address='52:54:00:00:06:01'/>
      <source type='unix' path='/var/run/openvswitch/vhost-user-1' mode='client'/>
      <model type='virtio'/>
      <driver name='vhost' queues='2'>
        <host mrg_rxbuf='on'/>
      </driver>
    </interface>
    <serial type='pty'/>
    <input type='tablet' bus='usb'/>
    <graphics type='vnc' autoport='yes' keymap='en-us' listen='0.0.0.0'/>
    <video>
      <model type='cirrus'/>
    </video>
    <memballoon model='virtio'>
      <stats period='10'/>
    </memballoon>
  </devices>
</domain>

sriov-passthrough的xml

<domain type='kvm'>
  <name>vm1</name>
  <memory>1024000</memory>
  <cpu mode='host-passthrough'>
     <cache mode='passthrough'/>
  </cpu>
  <vcpu placement='static' cpuset='0-3'>3</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/home/vm_workspace/vm1.qcow2'/>
      <target dev='vda' bus='virtio'/>
    </disk>
   <interface type='hostdev' managed='yes'>
     <source>
       <address type='pci' domain='0' bus='0x02' slot='0x10' function='0x00'/>
     </source>
     <mac address='52:54:00:6d:90:00'/>
     <vlan>
        <tag id='4000'/>
     </vlan>
   </interface>
   <interface type='hostdev' managed='yes'>
     <source>
       <address type='pci' domain='0' bus='0x02' slot='0x10' function='0x01'/>
     </source>
     <mac address='52:54:00:6d:90:01'/>
     <vlan>
        <tag id='4001'/>
     </vlan>
   </interface>

    <serial type='pty'/>
    <input type='tablet' bus='usb'/>
    <graphics type='vnc' autoport='yes' keymap='en-us' listen='0.0.0.0'/>
    <video>
      <model type='cirrus'/>
    </video>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <memballoon model='virtio'>
      <stats period='10'/>
    </memballoon>
  </devices>
</domain>
linux-bridge的xml
<domain type='kvm'>
  <name>vm1</name>
  <memory>1024000</memory>
  <cpu mode='host-passthrough'>
     <cache mode='passthrough'/>
  </cpu>
  <vcpu placement='static' cpuset='0-3'>3</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <clock offset='localtime'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/libexec/qemu-kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/home/vm_workspace/vm1.qcow2'/>
      <target dev='vda' bus='virtio'/>
    </disk>

    <interface type='bridge'>
      <model type='virtio'/>
      <source bridge='br-ext'/>
    </interface>

    <interface type='bridge'>
      <model type='virtio'/>
      <source bridge='br-int'/>
    </interface>

    <serial type='pty'/>
    <input type='tablet' bus='usb'/>
    <graphics type='vnc' autoport='yes' keymap='en-us' listen='0.0.0.0'/>
    <video>
      <model type='cirrus'/>
    </video>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <memballoon model='virtio'>
      <stats period='10'/>
    </memballoon>
  </devices>
</domain>



  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值