首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >e1000和virtio驱动程序的性能比较

e1000和virtio驱动程序的性能比较
EN

Unix & Linux用户
提问于 2016-10-13 15:01:43
回答 1查看 10.6K关注 0票数 14

为了比较virtio-pcie1000驱动程序的性能,我做了以下设置:

我预计在virtio-pci情况下,与e1000相比,吞吐量要高得多,但它们的性能是相同的。

使用virtio-pci进行测试(192.168.0.126配置为T60192.168.0.129配置为PC1):

代码语言:javascript
复制
root@PC1:~# grep hype /proc/cpuinfo
flags       : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx cx16 x2apic hypervisor lahf_lm tpr_shadow vnmi flexpriority ept vpid
root@PC1:~# lspci -s 00:03.0 -v
00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
    Subsystem: Red Hat, Inc Device 0001
    Physical Slot: 3
    Flags: bus master, fast devsel, latency 0, IRQ 11
    I/O ports at c000 [size=32]
    Memory at febd1000 (32-bit, non-prefetchable) [size=4K]
    Expansion ROM at feb80000 [disabled] [size=256K]
    Capabilities: [40] MSI-X: Enable+ Count=3 Masked-
    Kernel driver in use: virtio-pci

root@PC1:~# iperf -c 192.168.0.126 -d -t 30 -l 64
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 192.168.0.126, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.129 port 41573 connected with 192.168.0.126 port 5001
[  5] local 192.168.0.129 port 5001 connected with 192.168.0.126 port 44480
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-30.0 sec   126 MBytes  35.4 Mbits/sec
[  5]  0.0-30.0 sec   126 MBytes  35.1 Mbits/sec
root@PC1:~# 

使用e1000进行测试(192.168.0.126配置为T60192.168.0.129配置为PC1):

代码语言:javascript
复制
root@PC1:~# grep hype /proc/cpuinfo
flags       : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm rep_good nopl pni vmx cx16 x2apic hypervisor lahf_lm tpr_shadow vnmi flexpriority ept vpid
root@PC1:~# lspci -s 00:03.0 -v
00:03.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)
    Subsystem: Red Hat, Inc QEMU Virtual Machine
    Physical Slot: 3
    Flags: bus master, fast devsel, latency 0, IRQ 11
    Memory at febc0000 (32-bit, non-prefetchable) [size=128K]
    I/O ports at c000 [size=64]
    Expansion ROM at feb80000 [disabled] [size=256K]
    Kernel driver in use: e1000

root@PC1:~# iperf -c 192.168.0.126 -d -t 30 -l 64
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
------------------------------------------------------------
Client connecting to 192.168.0.126, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.0.129 port 42200 connected with 192.168.0.126 port 5001
[  5] local 192.168.0.129 port 5001 connected with 192.168.0.126 port 44481
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-30.0 sec   126 MBytes  35.1 Mbits/sec
[  5]  0.0-30.0 sec   126 MBytes  35.1 Mbits/sec
root@PC1:~# 

对于大数据包,在两种驱动程序的情况下,带宽为900 both。

virtio-pci的理论高性能是什么时候开始发挥作用的?为什么我看到与e1000virtio-pci一样的性能?

EN

回答 1

Unix & Linux用户

发布于 2021-09-07 20:46:50

您确实执行了带宽测试,这并不强调PCI。

您需要模拟具有多个并发会话的环境。在这里你应该看到不同之处。

也许-P 400可以使用iperf模拟这种测试。

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/316215

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档