zoukankan      html  css  js  c++  java
  • 网卡全虚拟化、virtio、vhost-net性能测试

    全虚拟化

    虚拟机启动参数:

    qemu-system-x86_64 -hda Linux -enable-kvm -m 2048 -smp 2 -machine q35 -netdev tap,script=no,downscript=no,id=mynet -device e1000e,netdev=mynet
    

    虚拟机中运行:

    iperf3 -s
    

    宿主机中运行:

    $ iperf3 -c 192.168.220.180
    Connecting to host 192.168.220.180, port 5201
    [  4] local 192.168.220.168 port 53048 connected to 192.168.220.180 port 5201
    [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
    [  4]   0.00-1.00   sec   121 MBytes  1.02 Gbits/sec   85   1.31 MBytes       
    [  4]   1.00-2.00   sec   126 MBytes  1.06 Gbits/sec    0   1.44 MBytes       
    [  4]   2.00-3.00   sec   126 MBytes  1.06 Gbits/sec    0   1.53 MBytes       
    [  4]   3.00-4.00   sec   125 MBytes  1.05 Gbits/sec    3   1.15 MBytes       
    [  4]   4.00-5.00   sec   127 MBytes  1.07 Gbits/sec    0   1.23 MBytes       
    [  4]   5.00-6.00   sec   126 MBytes  1.06 Gbits/sec    0   1.30 MBytes       
    [  4]   6.00-7.00   sec   126 MBytes  1.06 Gbits/sec    0   1.37 MBytes       
    [  4]   7.00-8.00   sec   127 MBytes  1.06 Gbits/sec    0   1.44 MBytes       
    [  4]   8.00-9.00   sec   127 MBytes  1.07 Gbits/sec    0   1.50 MBytes       
    [  4]   9.00-10.00  sec   121 MBytes  1.01 Gbits/sec   61   1.14 MBytes       
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bandwidth       Retr
    [  4]   0.00-10.00  sec  1.22 GBytes  1.05 Gbits/sec  149             sender
    [  4]   0.00-10.00  sec  1.22 GBytes  1.05 Gbits/sec                  receiver
    
    iperf Done.
    

    virtio

    虚拟机启动参数:

    qemu-system-x86_64 -hda Linux -enable-kvm -m 2048 -smp 2 -machine q35 -netdev tap,script=no,downscript=no,id=mynet -device virtio-net-pci,netdev=mynet
    

    虚拟机中运行:

    iperf3 -s
    

    宿主机中运行:

    $ iperf3 -c 192.168.220.180
    Connecting to host 192.168.220.180, port 5201
    [  4] local 192.168.220.168 port 53086 connected to 192.168.220.180 port 5201
    [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
    [  4]   0.00-1.00   sec  1.80 GBytes  15.5 Gbits/sec    0   3.05 MBytes       
    [  4]   1.00-2.00   sec  1.84 GBytes  15.8 Gbits/sec    0   3.05 MBytes       
    [  4]   2.00-3.00   sec  1.73 GBytes  14.9 Gbits/sec    0   3.05 MBytes       
    [  4]   3.00-4.00   sec  1.84 GBytes  15.8 Gbits/sec    0   3.05 MBytes       
    [  4]   4.00-5.00   sec  1.84 GBytes  15.8 Gbits/sec    0   3.05 MBytes       
    [  4]   5.00-6.00   sec  1.84 GBytes  15.8 Gbits/sec    0   3.05 MBytes       
    [  4]   6.00-7.00   sec  1.79 GBytes  15.4 Gbits/sec    0   3.05 MBytes       
    [  4]   7.00-8.00   sec  1.68 GBytes  14.4 Gbits/sec    0   3.05 MBytes       
    [  4]   8.00-9.00   sec  1.84 GBytes  15.8 Gbits/sec    0   3.05 MBytes       
    [  4]   9.00-10.00  sec  1.82 GBytes  15.6 Gbits/sec    0   3.05 MBytes       
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bandwidth       Retr
    [  4]   0.00-10.00  sec  18.0 GBytes  15.5 Gbits/sec    0             sender
    [  4]   0.00-10.00  sec  18.0 GBytes  15.5 Gbits/sec                  receiver
    
    iperf Done.
    

    vhost-net

    虚拟机启动参数:

    qemu-system-x86_64 -hda Linux -enable-kvm -m 2048 -smp 2 -machine q35 -netdev tap,script=no,downscript=no,vhost=on,id=mynet -device virtio-net-pci,netdev=mynet
    

    虚拟机中运行:

    iperf3 -s
    

    宿主机中运行:

    $ iperf3 -c 192.168.220.180
    Connecting to host 192.168.220.180, port 5201
    [  4] local 192.168.220.168 port 53124 connected to 192.168.220.180 port 5201
    [ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
    [  4]   0.00-1.00   sec  2.29 GBytes  19.7 Gbits/sec    0   3.14 MBytes       
    [  4]   1.00-2.00   sec  2.40 GBytes  20.7 Gbits/sec    0   3.14 MBytes       
    [  4]   2.00-3.00   sec  3.46 GBytes  29.7 Gbits/sec    0   3.14 MBytes       
    [  4]   3.00-4.00   sec  2.35 GBytes  20.2 Gbits/sec    0   3.14 MBytes       
    [  4]   4.00-5.00   sec  2.37 GBytes  20.3 Gbits/sec    0   3.14 MBytes       
    [  4]   5.00-6.00   sec  2.37 GBytes  20.4 Gbits/sec    0   3.14 MBytes       
    [  4]   6.00-7.00   sec  2.41 GBytes  20.7 Gbits/sec    0   3.14 MBytes       
    [  4]   7.00-8.00   sec  2.23 GBytes  19.2 Gbits/sec    0   3.14 MBytes       
    [  4]   8.00-9.00   sec  2.95 GBytes  25.3 Gbits/sec    0   3.14 MBytes       
    [  4]   9.00-10.00  sec  2.64 GBytes  22.7 Gbits/sec    0   3.14 MBytes       
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bandwidth       Retr
    [  4]   0.00-10.00  sec  25.5 GBytes  21.9 Gbits/sec    0             sender
    [  4]   0.00-10.00  sec  25.5 GBytes  21.9 Gbits/sec                  receiver
    
    iperf Done.
    
  • 相关阅读:
    jmeter测试接口--form表单提交请求(解决请求传参为空的问题)
    jmeter测试接口-打开很多TCP的连接数TIME_WAIT状态(Linux环境)导致报错的解决方法
    Jmeter 事务下的if控制器和无事务下的if控制器是否有不同 (业务实现3:2的补充)
    Jmeter if控制器的使用
    Jmeter 文件格式的参数化
    CentOS7学习笔记--tomcat9环境安装
    CentOS7学习笔记--PHP环境安装
    CentOS学习笔记—启动、ROOT密码
    虚拟机硬盘扩容
    win7如何设置某个软件不弹出用户账户控制
  • 原文地址:https://www.cnblogs.com/r1ng0/p/12911468.html
Copyright © 2011-2022 走看看