Marek Jan Microsoft Hyper V Performance Tuning
Marek Jan Microsoft Hyper V Performance Tuning
Marek Jan Microsoft Hyper V Performance Tuning
Performance Tuning
Jan Marek
Principle Architect
Cloud and Datacenter Platform Team Lead
Whos Jan?
v-guy
System Center
Active Directory
PowerShell
Performance Tuning of
Host
Virtual Machines resources
Host (BIOS)
Latest BIOS/UEFI firmware
Configure BIOS High Perf and GPO High Perf
Host (Hardware)
Latest NICs firmware and drivers (but test, test and test!)
Avoid disabling VMQ (dVMQ)
Enable Jumbo Frames for CSV, iSCSI and LM networks
Disable Non-iSCSI communication types on iSCSI NICs
Dont use NIC teaming for iSCSI NICs use MPIO
NIC teaming inside guest OS (sw-dep) should use SR-IOV NICs
Use 4k native disks
Use 64k allocation unit size for drives hosting VHD(X)
Use auto-size for Page File
Use processors with SLAT support and large cache
Do NOT use MemoryReserve reg key
Host (OS)
Core OS Edition
Windows Update + Hotfixes
&
Antivirus Exclusions
Host (Hyper-V)
Only Hyper-V role
VM Default Paths on non-system drive
Avoid multiple Virtual Network Switches (use VLANs)
Do NOT share adapter with physical OS
Virtual Machine
No NUMA
VM
NUMA n1
Host
NUMA n2
vNUMA n1
vs.
vNUMA n1
VM
NUMA n1
Host
NUMA n2
Virtual Machine
Supported Guest OS (pay attention to Generation version)
Virtual Machine
9000
Dynamic Memory
8000
7000
6000
5000
4000
3000
2000
1000
0
Example 1
Example 2
Demand
Buffer/Free
Assigned
Example 3
Example 4
Memory Left
Virtual Machine
High Weight
3000
Dynamic Memory
2500
2000
1500
1000
500
0
1 hour
2 hours
3 hours
Minimum
4 hours
5 hours
Demand
6 hours
7 hours
8 hours
7 hours
8 hours
Assigned
Low Weight
3000
2500
2000
1500
1000
500
0
1 hour
2 hours
3 hours
Minimum
4 hours
5 hours
Demand
6 hours
Assigned
Virtual Machine
Use Legacy Network Adapter only for PXE boot (Gen 1)
Remove unused vDevices (Gen 1)
VSP
VMbus
SYNTHETIC
Driver
hypervisor
hardware
LEGACY
Virtual Machine
Use Generation 2
Emulated 2 Synthetic
Generation 1 VM
Generation 2 VM
Virtual Machine
Install and update IS
Leave VM on logon screen + disable screen saver
Do NOT use VMconnect as a standard to connect to VM
Disable background activities:
SuperFetch
Windows Search
Scheduled Tasks (Defrag,)
Aero (optimize for performance)
Virtual Machine
Avoid using DHCP Guard and Router Guard
Dont forget to turn off Port Mirroring after use
Configure vRSS
VM Storage
Avoid CheckPoints
Avoid vIDE for data disks (Gen 1)
Use VHDX (instead of VHD or PT)
Fixed VHDs are recommended
Dynamic VHDXs are recommended
Check VHD (not VHDX) data allignment
Use ReFS in Hyper-V vNext
Use Virtual HBAs only if needed
Use Storage QoS
VM Storage
Configure Advanced I/O balancer only if needed (reg)
HKLM\System\CurrentControlSet\Services\StorVsp\
\IOBalance_Enabled
HKLM\System\CurrentControlSet\Services\StorVsp\
\IOBalance_KeepHwBusyLatencyTarget_Microseconds
-
how much work, represented by a latency value, the balancer allows to be issued to the hardware before throttling to provide better balance
default is 83ms
HKLM\System\CurrentControlSet\Services\StorVsp\
\IOBalance_AllowedPercentOverheadDueToFlowSwitching
-
how much work the balancer issues from a virtual machine before switching to another virtual machine
default is 8%
Cluster
Use Hyper-V cluster only for Hyper-V HA services
Separate Network Communication
Mgmt | VM | LM | HB | CSV | iSCSI | Backup
SMB storage
Use 10Gbps RDMA NICs
Use Storage Spaces Write-Back Cache
Async Hyper-V cluster is not supported
Hosting SMB storage inside VM running on Hyper-V Cluster is
not supported
Thank you!
redtoo Prague
redtoo Brno
Holandsk 854/1
Brno, 639 00
Czech Republic
This presentation (the Presentation) has been prepared by redtoo s.r.o. (redtoo) on a non-reliance and non-recourse
basis for information purposes and as a basis for discussion of certain issues mentioned therein.
The Presentation is incomplete without reference to, and should be viewed solely in conjunction with, the oral briefing
provided by redtoo.
The Presentation meets legal criteria for a copyright work. Redtoo hereby grants to the user thereof a non-exclusive, nontransferable and perpetual license to use the Presentation for its own purposes only. The Presentation may not be
reproduced, its original or copies distributed, rented, lent or communicated to third parties, all that neither in a piece or in
parts, without a prior explicit written approval granted by redtoo.
The Presentation has been prepared by redtoo on the basis of information in the public domain as well as confidential
information provided by [source]. It reflects prevailing conditions and redtoo's views as of this date, all of which are subject
to change. None of the information on which the Presentation is based has been independently verified by redtoo.
Neither redtoo nor any of its directors, employees and agents accept any liability with respect to the accuracy or
completeness, or in relation to the use by any recipient (any third party and/or the user), of the projections, information or
opinions contained in the Presentation. Unless explicitly specified otherwise by redtoo in writing, if, notwithstanding the
terms here, any recipient chooses to rely upon the Presentation or any part thereof, it agrees that it will do so at his/her
own risk and without recourse to redtoo its directors, employees and agents.
2014 redtoo s.r.o.