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

发表于:2018-4-17 11:44

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:hailwind    来源:CSDN

  dpdk+ovs 与 物理机 与 sriov(pci passthrough) 纯粹的linux bridge的性能对比
  CPU E5-2680V2 2.8G,网卡 ixgbe intel 82599。
  测试方法:路由转发
  结构为:A------R------B
  实际上R有两块网卡,有4个方向的数据包,本测试只取其中之一,同时使用了LINUX的路由功能做测试,所以不做为各种技术的基准测试参考,只是一个相对值。
  A做netserver,R替换为以上各种模式的机器,B做netperf的客户端
  分别使用netperf做20、40、80并发并绑定CPU进行TCP_RR测试。
  dpdk-ovs-vhost-user的xml:
  [html] view plain copy
  <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
  [html] view plain copy
  <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
  [html] view plain copy
  <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>  




上文内容不用于商业目的,如涉及知识产权问题,请权利人联系博为峰小编(021-64471599-8017),我们将立即处理。
《2023软件测试行业现状调查报告》独家发布~

精彩评论

  • consteven
    2020-8-17 17:04:48

    请问数据使用iperf3测试出来的吗?按照这个数据,用了dpdk+ovs 和sriov的虚拟机网卡甚至性能超过物理了网卡?

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号