To help refine Hyper-V servers, you can think of what can be changed
to improve their performance, security, and administration. The problem
is that most people do it only when something is wrong.
You can save resources and improve performance by fine-tuning
changes and by configuration that can be done before implementation or
even in running servers.
This recipe is a little bit different
from the others. Rather than tasks, it will provide you with tips and
best practices from previous recipes, listing the principal features and
configuration options that can help with server tuning.
The following best practices help improve your Hyper-V server performance:
- Use Server Core wherever possible:
The lower hardware consumption and number of updates and resources
involved will enable higher performance and security for Hyper-V
servers.
- Use dedicated servers for Hyper-V:
In other words, don't combine different roles in just one server. Other
roles can share and steal important resources from Hyper-V and vice
versa.
- Use only supported virtual machines:
Due to integration services, the virtual machine OS and version will
have a huge impact when no supported VMs are running in production.
- Use Dynamic Memory for virtual machines:
The process of lending memory from low workload VMs to other VMs in
need is carried out automatically It can use the necessary memory, based
on the VM necessity.
- Use the new VHDX format instead of VHD:
The new format has a 64-TB limit, 32 times larger than the old one, but
that is not the only new enhancement. Other improvements include native
4K disk alignment, for better performance, larger block sizes, and
security enhancements. There is no reason to use VHD in a Windows Server
2012 environment anymore.
- Enable SR-IOV and Network Teaming:
Do this for large virtual machine network workloads and get better
performance, bypassing the virtual switch (SR-IOV) and segregating more
than one network to create a teaming (Network Teaming).
- Attach Virtual Fibre Channel adapters:
This allows virtual machines to access your LUNs directly, providing
improved performance and enabling guest clustering scenarios even more
easily.
- Use data deduplication in VHDs libraries: This saves disk space. The amount of disk space you can save can reach up to 85 percent.
- Use SMB 3.0 to store VMs on shared folders.
The new protocol, used most commonly to access files on the network,
can now host virtual machines on a shared folder. It is a perfect option
for small business that can create a cluster using a shared folder as
storage, running low workload on virtual machines in there.
- Create and use Storage Pools:
They can add disks logically, creating high availability pools with a
great performance for virtual machine disks, such as RAID 5 and RAID
1+0.
- Use PowerShell: With the new version, PowerShell
is even easier to adopt.
- Create a separate disk for page files:
When configuring Hyper-V Replica, create a separate disk for the page
file within the VMs, and exclude it from being replicated. The page file
causes lots of replication requests, and it can save a huge amount of
performance and network utilization for replica servers.
As
you can see, simple configurations can be added or changed, and the
results will surprise you. You can improve disk, memory, security,
processor, administration, and much more on Hyper-V using the built-in
tools and features, without the need for third-party products.
This is the list summary used in the recipe:
- Server Core
- Dedicated Hyper-V servers
- Supported virtual machines
- Dynamic Memory
- VHDX
- SR-IOV
- NIC Teaming
- Virtual Fibre Channel adapters
- Data deduplication
- SMB 3.0
- Storage Pools
- PowerShell
These
features are used based on the workload and necessary performance
needed on virtual machines and host computers. The use of all of them
for every server is not recommended, so you need to analyze which one is
the perfect match for your current environment. Some examples, such as
Server Core and dedicated Hyper-V servers, are best practices and
absolute musts for every host server with Hyper-V installed, due to the
performance and security they can offer; some other options, such as
data deduplication and Virtual Fibre Channel, should only be used in
particular scenarios.
Dynamic Memory and VHDX can help with performance, and they can also be used without any limitation, on every virtual machine.
SR-IOV,
NIC Teaming, and Virtual Fibre Channel are great (the best in the
matter of performance) but can be expensive in some scenarios. For that
reason, SR-IOV should be used only for virtual machines that require a
large network I/O, whereas for network adapter high availability, use
either Virtual Fibre Channel adapters or NIC Teaming.
Other simple things on Windows Server 2012 that can help are:
- Data deduplication, to save disk space
- SMB
3.0, for small and medium size companies, allowing them to have high
availability virtual machines using two Hyper-V servers and a single
shared folder
- Storage Pools, to aggregate disks logically to create pools
Last
but not least is PowerShell. It is the most powerful management tool
that administrators can use to save time and effort while managing
virtual environments.
Combining all these features based on the
scenarios you have will guarantee your servers have the best
configuration and practices for Hyper-V tuning.