news 2026/8/22 12:14:50

centos虚拟机里面为何执行ethtool不显示速率?

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
centos虚拟机里面为何执行ethtool不显示速率?

最近蛮多类似询问,虚拟机里面执行ethtool为何不显示速率,但是windows却能显示速率为10Gbps。上图上图:

与物理主机不同,在kvm虚拟化环境中,ethtool仅返回了网口状态。来看看红帽的说明:

Issue

  • How do I check the network speed of avirtio-netnetwork interface?
  • When a VM use virtio NICs,ethtoolis not working
  • Why virtio network nic speed is 1G in subnetwork tab in RHEV Manager web interface ?

Resolution

  • This is expected, there is no set speed that avirtio-netinterface can operate at.
  • The 1Gbps is just a placeholder because the driver has to report something.

Root Cause

  • There's no "set speed" that avirtio-netinterface obtains. It's a software implementation of a network interface,it obtains the fastest possible speed it can, and that speed will vary depending on the network/CPU/memory load on the virtualization host at the time, as well the traffic.

  • Consider that the emulatede1000network interfaces will report their speed as 1Gbps because they are a software emulation of a 1GbE interface. However, if you do traffic between two VMs on the same host using the emulatede1000interfaces, you will likely find you can exceed 1Gbps without a problem.If you emulate thise1000interface on a physical host with a 100Mbps network connection, then your guest will still say it has a 1-gigabit interface, but the maximum throughput attainable is 10% of that or less.Through all this,ethtoolwill still report the interface is operating at 1Gbps.

  • The behavior of thevirtio-netinterfaces is the same, except the performance will be better because it's para-virtualized instead of emulated, and it won't report speed inethtool.

  • There is no way theethtoolprocess within a guest can possibly know the maximum speed that a givenvirtio-netinterface can obtain at any given time, so there is nothing forvirtio-netto report toethtool.

总结下,在kvm环境,如果使用virtio_net驱动,linux下不会显示速率,会尽可能使用物理网络性能;如果配置的是e1000网卡,则会输出速率为1Gbps,但这个显示不代表实际能达到的速率,比如物理网络是100M,在e1000场景,也还是会显示1G。类似的,在windows下。默认不支持virtio驱动,需要安装驱动后才能支持,其速率也是驱动层面设置,而非实际的物理网络速率。

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/8/22 12:14:46

3分钟把开源宏录制工具PyMacroRecord调成中文界面:完整指南

3分钟把开源宏录制工具PyMacroRecord调成中文界面:完整指南 【免费下载链接】PyMacroRecord Free and Open Source Macro Recorder with a modern GUI using Python 项目地址: https://gitcode.com/gh_mirrors/py/PyMacroRecord PyMacroRecord 是一款免费的开…

作者头像 李华
网站建设 2026/8/22 12:14:16

【VRTK】【VR开发】【Unity】19-VRTK实现旋转运动

课程配套学习项目源码资源下载 https://download.csdn.net/download/weixin_41697242/88485426?spm=1001.2014.3001.5503 【背景】 在实际开发中,旋转运动也是时常需要模拟的重要运动类型。常见的场景有开关门,方向盘轮胎以及拉动拉杆等等。 旋转运动的实现可以基于物理系…

作者头像 李华
网站建设 2026/8/22 12:13:40

搭建elk环境并接入frostmourne,实现监控报警效果(三)

浏览 #docker-compose.yaml配置 version: 3.8 services:kibana:# 镜像名称image: docker.elastic.co/kibana/kibana:8.6.0# 容器名称hostname: kibanacontainer_name: kibanaports:- 5601:5601volumes:- /data/elk_monitor/kibana/config/kibana.yml:/usr/share/kibana/confi…

作者头像 李华
网站建设 2026/8/22 12:12:24

Realtek 8192FU 无线网卡驱动:一次配置长期有效的 Linux 安装指南

Realtek 8192FU 无线网卡驱动:一次配置长期有效的 Linux 安装指南 【免费下载链接】rtl8192fu Realtek 8192FU Linux USB无线网卡驱动 项目地址: https://gitcode.com/gh_mirrors/rt/rtl8192fu Linux 默认不带 Realtek 8192FU 的驱动,这张无线网卡…

作者头像 李华
网站建设 2026/8/22 12:11:35

Java 浮点数如何运算

为什么浮点数运算的时候会有精度丢失的风险?浮点数运算精度丢失代码演示:float a 2.0f - 1.9f; float b 1.8f - 1.7f; System.out.println(a);// 0.100000024 System.out.println(b);// 0.099999905 System.out.println(a b);// false为什么会出现这个…

作者头像 李华