• No results found

Microsoft Hyper-V Performance Tuning

N/A
N/A
Protected

Academic year: 2021

Share "Microsoft Hyper-V Performance Tuning"

Copied!
26
0
0

Loading.... (view fulltext now)

Full text

(1)

Microsoft Hyper-V

Performance Tuning

Jan Marek

Principle Architect

Cloud and Datacenter Platform Team Lead

(2)

Who’s Jan?

• v-guy 

• Hyper-V | App-V | MED-V | UE-V | Azure IaaS | VMware vSphere

• System Center

• Active Directory

• PowerShell

• MCSE | MCSA | MCITP | MCTS | MCT | MS

• Working with Hyper-V since it was Viridian 

• Microsoft MVP for Hyper-V

(3)

This talk is about

• Microsoft Hyper-V (Windows Server / Hyper-V Server)

• 2012 R2

• Performance Tuning of

• Host

(4)

Host (BIOS)

• Latest BIOS/UEFI firmware

(5)

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

• Don’t 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

(6)

Use Parent Partition PerfMon

• Always measure the CPU usage of the physical system by using

the Hyper-V Hypervisor Processor performance counters

(7)

Host (OS)

• Core OS Edition

• Windows Update + Hotfixes

&

• Antivirus Exclusions

(8)

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

• Do NOT leave Hyper-V Manager running

• Leave Host NUMA enabled

(9)

VM

vNUMA n1 vNUMA n1

VM

No NUMA

Host

Host

NUMA n1

NUMA n2

NUMA n1

NUMA n2

Virtual Machine

(10)
(11)

Virtual Machine

(12)

Virtual Machine

• Dynamic Memory

0 1000 2000 3000 4000 5000 6000 7000 8000 9000

Example 1 Example 2 Example 3 Example 4 Demand Buffer/Free Memory Left

(13)

Virtual Machine

• Dynamic Memory

0 500 1000 1500 2000 2500 3000

1 hour 2 hours 3 hours 4 hours 5 hours 6 hours 7 hours 8 hours

High Weight

Minimum Demand Assigned

0 500 1000 1500 2000 2500 3000

1 hour 2 hours 3 hours 4 hours 5 hours 6 hours 7 hours 8 hours

Low Weight

(14)

Virtual Machine

• Use Legacy Network Adapter only for PXE boot (Gen 1)

• Remove unused vDevices (Gen 1)

hypervisor

hardware

VMbus

VSP

Driver

SYNTHETIC

LEGACY

(15)
(16)

Virtual Machine

(17)

Emulated 2 Synthetic

(18)

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,…)

(19)

Virtual Machine

• Avoid using DHCP Guard and Router Guard

• Don’t forget to turn off Port Mirroring after use

• For VLAN comm. use NICs with

NDIS_ENCAPSULATION_IEEE_802_3_P_AND_Q_IN_OOB encapsulation for

Large Send Offload and checksum offload

support

(20)

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

(21)

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

(22)

Cluster

• Use Hyper-V cluster only for Hyper-V HA services

• Separate Network Communication

• Mgmt | VM | LM | HB | CSV | iSCSI | Backup

• Set preferred network for CSV communication

• (Get-ClusterNetwork "Cluster Network 1").Metric = 700 (“< 1000”)

• Use CSV cache for read-oriented VMs (VDI)

• (Get-Cluster).BlockCacheSize = 1024

• LM: for >10Gbps use RDMA, for <10Gbps use compression

• LM: increase the number of send and receive buffers on each LM NIC

• Avoid using Low Priority VMs

(23)

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

(24)

Thank you!

redtoo Prague Na Pankráci 1683/127 (Gemini A) Praha 4, 14000 Czech Republic [email protected] redtoo Brno Holandská 854/1 Brno, 639 00 Czech Republic [email protected]

(25)

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 exclusive, non-transferable 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.

(26)

References

Related documents

• Unless Water Corporation agrees in writing otherwise, no property owner or occupier of the land shall connect or allow to be connected, a pump to any part of a private water supply

First divorce is a civil law decree from the state whereas an annulment is a canon law decree from the Church The Episcopal Church has been moving toward.. This is a scary and

Recipient, by accepting this document, agrees that it will not duplicate, use, or disclose—in whole or in part—this document, or the information contained therein, or any part

Failure to disclose full and accurate details about your previous history, practice and/or relevant income will invalidate your membership which means you are not entitled to

But when the value-adding procedures are organizationally separated from the work of solution shops, the overhead costs of the value-adding activities drop so dramatically that

Unless otherwise specified in the Special Terms and Conditions, the Supplier will deliver the Products and/or provide the Services and any deliverables required thereunder to

The Grant Recipient hereby agrees that it will incorporate or cause to be incorporated into any contract for construction work, or modification thereof, as defined in the

Any additional services agreed upon for this Project outside of, or in addition to, this Agreement will be due upon request for services unless otherwise stated and signed in