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

  1. 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.

  2. On my Hyper-V host, I open Regedit and drill down to HKLM\SYSTEM\CurrentControlSet\Services\VMSMP\Parameters

  3. 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.

  4. 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/

After 2 years, I have finally solved my "Slow Hyper-V Guest Network Performance" issue. I am ecstatic.的更多相关文章

  1. Raft

    http://thesecretlivesofdata.com/raft/ https://github.com/coreos/etcd   1 Introduction Consensus algo ...

  2. CITS1401 Computational Thinking with Python

    Department of Computer Science and Software EngineeringCITS1401 ComputationalThinking with PythonPro ...

  3. Analytic Functions in Oracle

    Contents Overview and IntroductionHow Analytic Functions WorkThe SyntaxExamplesCalculate a running T ...

  4. 2690036 - SAP HANA 2.0 SPS 03 Database Revision 034

    Symptom This is the SAP Release Note for SAP HANA 2.0 Database Revision 034 (2.00.034.00) of the SAP ...

  5. Arbiter

    from  2015-EDCAV-Problems encountered in various arbitration techniques used in NOC router-A survey ...

  6. 学习笔记:The Best of MySQL Forum

    http://mysql.rjweb.org/bestof.html I have tagged many of the better forum threads. 'Better' is based ...

  7. C++ Core Guidelines

    C++ Core Guidelines September 9, 2015 Editors: Bjarne Stroustrup Herb Sutter This document is a very ...

  8. linux tcp调优

    Linux TCP Performance Tuning News Linux Performance Tuning Recommended Books Recommended Links Linux ...

  9. Neural Networks and Deep Learning

    Neural Networks and Deep Learning This is the first course of the deep learning specialization at Co ...

随机推荐

  1. 【黑客免杀攻防】读书笔记10 - switch-case分支

    0x1 switch-case分支 switch-case其实就是if-else语句的另一种体现形式.但大于3之后的switchc-case.编译器会对代码进行优化. 1.1 简单switch-cas ...

  2. mitmproxy实践

    首先附上github地址:https://github.com/mitmproxy/mitmprox,上面的内容永远是最新的 作为一名测试穿戴设备相关app的工程师,与数据打交道是常事,那么,如果想要 ...

  3. vs2017 Remote Debugger远程调试目录

    默认目录:C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\Remote Debugger

  4. 第三届CCF软件能力认证

    1.门禁系统 问题描述 涛涛最近要负责图书馆的管理工作,需要记录下每天读者的到访情况.每位读者有一个编号,每条记录用读者的编号来表示.给出读者的来访记录,请问每一条记录中的读者是第几次出现. 输入格式 ...

  5. 【LOJ】#2531. 「CQOI2018」破解 D-H 协议

    题解 BSGS直接解出a和b来即可 代码 #include <bits/stdc++.h> #define fi first #define se second #define pii p ...

  6. relay.index' not found

    主备搭建时,备库上执行以下语句报错: (root@localhost:mysql.sock)[(none)]>change master to master_host='192.168.0.57 ...

  7. 000 在什么位置写js代码

    一:介绍 1.DOM 2.节点分类 节点及其类型: 1). 元素节点 2). 属性节点: 元素的属性, 可以直接通过属性的方式来操作. 3). 文本节点: 是元素节点的子节点, 其内容为文本. 二:J ...

  8. 几种常见类的使用(System,Runtime,Math,Date,Calendar,Random)

    一:System 1.介绍 System:类中的方法和属性都是静态的. out:标准输出,默认是控制台. in:标准输入,默认是键盘. 2.properties 获取系统属性信息:Properties ...

  9. [转]01分数规划算法 ACM 二分 Dinkelbach 最优比率生成树 最优比率环

    01分数规划 前置技能 二分思想最短路算法一些数学脑细胞? 问题模型1 基本01分数规划问题 给定nn个二元组(valuei,costi)(valuei,costi),valueivaluei是选择此 ...

  10. 【Ray Tracing in One Weekend 超详解】 光线追踪1-7 Dielectric 半径为负,实心球体镂空技巧

    今天讲这本书最后一种材质 Preface 水,玻璃和钻石等透明材料是电介质.当光线照射它们时,它会分裂成反射光线和折射(透射)光线. 处理方案:在反射或折射之间随机选择并且每次交互仅产生一条散射光线 ...