After 2 years, I have finally solved my "Slow Hyper-V Guest Network Performance" issue. I am ecstatic.
Edit - It should be known that I was initially researching this issue back in 2012 and the solution was surely not as known as it is now, otherwise, I'd have found it then. :)
2 years is a long time to deal with sluggish VMs. Pings to other boxes in the same network would vary between 30ms all the way up to 300ms. The truth of the matter is that I had given up. "Fix" after "fix" involving various offloading features being disabled had led me nowhere, so I stopped researching and chalked it up to some inherent issue with Hyper-V on 2008 R2.
Today, observing read-only Friday, I decided to use the term literally and do research all day into various unsolved issues I've had in the past, so that I could come in on Monday hopefully with some fixes.
I found it, and in my pure excitement, after testing on my standby host, I broke code and went out of read-only mode on prod, and the difference it has made is nothing short of glorious.
ENVIRONMENT
My Hyper-V hosts are Dell PowerEdge R520, utilizing Broadcom NetXtreme 1Gb NICs and running Server 2008R2 SP2. Firmware/drivers all up to date. The issue has only ever existed on the guest VMs, never the host nor any other baremetal box.
RESOLUTION
There's this little thing called Virtual Machine Queues. In short, it increases overall throughput for VMs by offloading virtual network processing to the physical adapter. Read more here.
Prior to stumbling across that article, I had actually stumbled upon a resolution that basically solves the issue by simply disabling VMQ on the physical adapters assigned to the VMs. But I started reading about VMQ and I wanted it!
So I then found the above article and realized the problem:
Broadcom has VMQ enabled by default, however, there is a registry value that needs to be added first for VMQ to function properly. Without the registry value, you get the problem of slow network performance.
STEPS
-
Since Broadcom has VMQ enabled by default, I disable it in the configuration properties of all my physical adapters assigned to my guests, in the advanced tab. Intel NIC owners need not do this step, as Intel has it disabled by default.
-
On my Hyper-V host, I open Regedit and drill down to HKLM\SYSTEM\CurrentControlSet\Services\VMSMP\Parameters
-
I then add to Parameters a DWORD value and name it BelowTenGigVmqEnabled (since I have a 1Gb adapter. 10Gb owners need TenGigVmqEnabled) and give it a value of 1.
-
Finally, I go back to the physical adapters and enable Virtual Machine Queues. Instantaneously, network performance issues are solved and my pings are all <1ms. This also actually sped up the OS in my VMs and they are no longer sluggish. Queries to AD now return in a snap. My world is now beautiful.
As far as I'm aware, this applies to 2012 as well. Someone else may be able to confirm that.
SO... That's it! I'm going to have a great Friday night.
Edit 2 - The gift keeps on giving. Very basically, we have a proprietary sort of middleware application that connects to service mailboxes for clients via POP3 in order to process emails and table them in a database to then send via satellite to offshore vessels, among other data, both ways. Normally this middleware app takes around 10 minutes to get through all the clients' mailboxes. Well, not long after the fix, I notified a developer to keep an eye on the app and let me know if the run time changes...
A few minutes later he walks to my desk and tells me to RDP into the utility server. I do. He then tells me to look at the Task Scheduler history. I do. The task completed in 1 minute and 19 seconds! So basically, this means we can update the intervals so that data exchange is closer to real-time, and this will positively impact the core of our business.
Sometimes it's the little things that make all the difference.
P.S. my boss let everyone go home early. I drink beer as we speak.
Edit 3 - Whoever gilded me, PM me with evidence of your gilding so that I can know your username. I will then, on Monday, name a log file after you, which is generated from a PS script I have on a scheduled task that deletes archived files older than 30 days. I will then send you a screen grab of the log file for your keepsake and knowledge that whoever comes after me at this company will always wonder what the hell /u/WhoEverYouAre_log means until he Googles it and finds you, and eventually this post.
这种方法依然无法解决我的问题,我自己笔记本上win10安装Hyper-v,安装centos7后,centos里面firefox和terminal里网络超级慢;
于是,各种搜索,最后有个帖子的评论里有个人说自己测试,如果不使用虚拟交换机的DHCP分配IP,而是自己指定IP,速度就很快,于是我自己通过测试发现,的确是这样的。。。。
from:https://www.reddit.com/r/sysadmin/comments/2k7jn5/after_2_years_i_have_finally_solved_my_slow/
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 25岁的心里话
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
2016-03-03 .Net Discovery系列之十二-深入理解平台机制与性能影响(下)
2016-03-03 .Net Discovery系列之十一-深入理解平台机制与性能影响 (中)
2016-03-03 .Net Discovery系列之十-深入理解平台机制与性能影响(上)
2016-03-03 .Net Discovery 系列之七--深入理解.Net垃圾收集机制(拾贝篇)
2016-03-03 .Net Discovery 系列之六--深入浅出.Net实时编译机制(下)
2016-03-03 .Net Discovery 系列之五--深入浅出.Net实时编译机制(上)
2016-03-03 .Net Discovery 系列之二--string从入门到精通(下)