Anda di halaman 1dari 8

Avoiding Performance Bottlenecks in Hyper-V Virtualization Management White Paper

Avoiding Performance Bottlenecks in Hyper-V

Identify and eliminate capacity related performance bottlenecks in Hyper-V while placing new VMs for optimal density and performance

WHITEPAPER BY CHRIS CHESLEY

2012 VKernel Corporation

http://www.vkernel.com

Avoiding Performance Bottlenecks in Hyper-V Virtualization Management White Paper

Overview
Managing how you share CPU, memory and storage resources is the key to avoiding performance problems in any virtual environment. Hyper-V environments are no different. This paper will cover some lessons learned in years of experience managing capacity resources in a VMware environment and how those same techniques can be applied to a Hyper-V environment. Since many of you are already familiar with VMware, we will be comparing Hyper-V to VMware. We will cover how to manage resources (CPU, memory storage and disk I/O) to obtain the maximum safe VM density, how to avoid performance bottlenecks, and how to compute how much capacity there is to add virtual machines for each host and cluster.

Hyper-V Management Tools


There are a few different applications available to the administrator to assist in managing Hyper-V. Hyper-V Manager The Hyper-V Manager (HVM) is installed when you install the Hyper-V role in Windows server 2008 or it can also be installed separately on any desktop or server. The Hyper-V manager provides administrators with the ability to build, configure and destroy virtual machines, but does not allow clustering and other features that are available in the Virtual Machine Manager (VMM). You can manage multiple Hyper-V hosts from a single Hyper-V Manager. Virtual Machine Manager The Virtual Machine Manager (VMM) is a separate application sold by Microsoft and is comparable to VMwares VCenter. It provides the ability to build, destroy and configure virtual machines as well as offering the ability to move virtual machines between HyperV hosts. VMM also has the ability to receive ProTips from Systems Center that will alert administrators to events or issues in their virtual environment. System Center Operations Manager System Center Operations Manager (SCOM) allows you to add management packs to monitor virtual machines and hosts. There are management packs for Hyper-V that will collect and report on resources used by the Hyper-V guests and hosts. VKernel also has a management pack that is loaded into SCOM. This will give you consolidated information from all your hosts and guests that are running in both VMware and Hyper-V as well as the ability to send Pro Tips to SCOM or VMM.
http://www.vkernel.com/products/CapacityAnalyzerwithHyper-V/

2012 VKernel Corporation

http://www.vkernel.com

Avoiding Performance Bottlenecks in Hyper-V Virtualization Management White Paper

Fig. 1 HyperVs Virtual Machine Manager

Differences between VMware and Hyper-V


There are also some significant differences between Hyper-V and VMware that the admin should be aware of. Over-committed resources One of the big differences between VMware and Hyper-V is the ability to over commit memory. In VMware you can assign more memory to virtual machines than physically exists on the host or resource pool. The idea is that the virtual machines will not use all their assigned resources at the same time. Assigning more memory than is available can increase your guest density (more guests running on the same hardware. More VMs on the same physical hardware means a better return on what you paid for the hardware

2012 VKernel Corporation

http://www.vkernel.com

Avoiding Performance Bottlenecks in Hyper-V Virtualization Management White Paper

and virtualization software. Hyper-V will not allow the administrator to over allocate memory. While this may limit your ability to achieve higher density, it also means you can always count on the provisioned memory to be available. There is still a lively debate going regarding memory over committing and if this is beneficial or problematic in a virtual environment. You can over commit CPU in both VMware and in Hyper-V. Over-committed resources VMware has memory and CPU metrics that are not available in Hyper-V. Specifically these are CPU ready, memory ballooning and swapping. CPU ready is a measurement of how much time a virtual processor has to wait for a physical processor to run on. Memory ballooning and swapping are both needed by VMware since they allow memory over committing and need a way of taking memory from one guest and giving it to another. It is also needed to give more memory to guests than is available on the host. DRS and TPS Distributed Resource Scheduler (DRS) and TPS (Transparent Page Sharing) are only available in VMware. DRS will either move virtual machines from one host to another or will make recommendations that you move them based on resources that are used and available on the hosts. TPS is a method where VMware will recognize memory pages that are used by multiple systems and not load duplicate pages. Instead it will load the memory pages once and then provide pointers to all the guests using those pages. It can offer up to a 30% savings in memory utilization if an administrator pays attention to what OS and applications are running on particular hosts and groups them together. HA High Availability (HA) is a feature of VMware where they will restart guests on a different host if the system they are on goes down or loses contact with VCenter (VMwares management interface). Microsoft Hyper-V servers can be configured to be part of a Microsoft failover cluster which offers the same functions as HA from VMware.

Capacity Management in a Virtual Environment


Managing the balance between performance and capacity utilization is only made more difficult by virtualization. In a traditional server infrastructure each server or application has its own memory, processors and sometimes storage so it could use whatever of those resources was needed. Even though virtualization allows you to share these resources, there is still a physical limit to the amount of CPU, memory, storage and disk I/O that is available. In a virtual environment, there are more levels where capacity bottlenecks can occur: You can have a memory bottleneck on a host or storage issue for a cluster;

2012 VKernel Corporation

http://www.vkernel.com

Avoiding Performance Bottlenecks in Hyper-V Virtualization Management White Paper

Bottlenecks can occur when a server takes up more resources than planned; Performance can be affected if a host or cluster is overloaded and there is not enough memory or CPU to go around; One guest can affect the performance of other virtual machines on that host or cluster.

Since most virtual server infrastructures are highly dynamic, the secret to success is active capacity management. Specifically, you have to compare the amount of CPU, memory and storage allocated to what it is actually consumed. The difficulty with actively managing capacity in Hyper-V is that the available tools only show CPU utilization for a specific host or VM. Obviously, the more VMs you have, the less able you are to continuously check whether youve outgrown the assumptions you made when you provisioned a server.

Fig. 2: VKernels Capacity Analyzer automates capacity utilization analysis A much better way of seeing this information is to use a solution that sees the entire virtualized environment and automatically does that comparison for you. A solution that will allow you to look at all the statistics in one screen and then show you anything that is not healthy is much easier to use then looking at the information one statistic and one level at a time. This is what VKernels products do http://www.vkernel.com Memory, CPU, storage and disk I/O are the important statistics to keep track of in a virtual environment.

2012 VKernel Corporation

http://www.vkernel.com

Avoiding Performance Bottlenecks in Hyper-V Virtualization Management White Paper

Keeping on top of capacity utilization pays back when it comes to these common management issues: Avoiding performance bottlenecks: Memory is usually the first bottleneck that is reached followed by CPU or disk I/O issues. Your infrastructure needs to be monitored to make sure each element is getting all of the resources allocated to it. Each resource needs to be monitored to make sure they are not at an extremely high level of utilization. For example a guest that is using 100% of the memory allocated to it is probably having performance issues. Getting higher numbers of VMs on servers/storage: On the other hand, a virtual machine that is only using 40% of the resources allocated to it and is running well is an opportunity to right size. If you can track historical utilization levels and know peak usage is 40% of what you allocated, you can reduce the amount of resources allocated to existing VMs and fit more VMs on the same machine. Figuring out where to place new VMs: Looking at resource utilization at the host or cluster level is also an excellent way to determine where to place new virtual machines. Without visibility into capacity utilization, you can only guess at what capacity is available and which resource is the constraining factor in adding more VMs. Since our biggest fear is causing a performance impact on the other guests on that host, we tend to under estimate how many VMs we can fit. This initial placement is more important in Hyper-V than in VMware since there is no Distributed Resource Scheduling in Hyper-V that will move virtual machines to another host if there are performance issue or if another host is has more available resources. Managing Memory Memory tends to get used and then store information for fast retrieval later so the utilization for memory tends to be higher than CPU and is typically the first bottleneck that virtual environments run into. It is important to track memory consumed to determine if a virtual machine is getting enough resources or if the guest if having a performance issue. A consistent utilization of at or near 100% may indicate that the virtual system may benefit from more memory. Managing CPU CPUs are the main workhorses of both virtual and physical servers. It is important that administrators keep a close eye on CPU to make sure that there is enough to go around and that the virtual processors get access to a physical processor when they need it. Important metrics to look at are CPU consumed as well as percent utilized by the guest. Managing Disk I/O This is a very important measurement for administrators to keep track of in a virtual infrastructure. There are many types and speeds of storage so there are no overall thresholds that fit every environment. Important metrics to look at are disk latency, queue latency and throughput. Latency is a measurement of how long a disk command takes to return once it has been given and is measured in milliseconds. Queue latency

2012 VKernel Corporation

http://www.vkernel.com

Avoiding Performance Bottlenecks in Hyper-V Virtualization Management White Paper

tracks how long a command has to wait before it is executed with the lower the value the better. Throughput is how many read and write commands have been executed. An over loaded LUN or disk can be identified using these metrics and looking at the data store as a whole and is measured on a per host basis. Managing Storage This is important item to keep an eye on but tends to be more static than the others unless new virtual machines are being created or deleted.

Computing Capacity Availability


Capacity availability is a measure of how many virtual machines can be safely added to a host or cluster without overloading any of the shared resources. It is usually stated as the number of virtual machines of a particular size that can safely be run. The calculation requires the following steps: Look at each host and cluster, determine what resources are used for CPU, storage, disk I/O and memory then determine how much is unused at that level (host or cluster). Next you need to look at all the virtual machines running on the host or cluster, and then compute an average or desired size of the virtual machines that you are going to be adding. The next step is to determine what a safe level of utilization for each resource is in your environment. For example, 85% memory utilization may be a reasonable threshold for this cluster or host. The final step is to compute how many more of the calculated sized virtual machines you can fit before you hit the target utilizations. Maximum Size Method Some administrators prefer a more conservative calculation when computing capacity. One easy way of doing this is to use maximum values when coming up with a calculated VM size. To do this you look at all the virtual machines running on the host or cluster and determine which has the highest value, then use the highest values for CPU, memory, storage and disk I/O when making your capacity availability calculations. Some administrators exclude storage from these calculations because they add LUNs when needed. The Importance of VM Placement in Hyper-V The initial placement of virtual machines is very important in Hyper-V since there is no DRS functionality that will move virtual machines around based on resource availability. The best way of doing this is to look at the average and peak utilization for all the resources for each host and cluster, then determine what resources the new virtual machine will need. After this you can then decide on the best host to deploy the virtual machine onto. The capacity availability of the host should also be calculated and

2012 VKernel Corporation

http://www.vkernel.com

Avoiding Performance Bottlenecks in Hyper-V Virtualization Management White Paper

taken into account as well as the administrators knowledge of what applications are running on the host or cluster.

Fig. 3: VKernels Capacity Analyzer automates Capacity Availability calculations VKernel automates the above these availability calculations and automatically provides a Capacity Availability Map. http://www.vkernel.com/products/CapacityAnalyzer/

Conclusion
An effective approach to capacity management can help you easily determine capacity availability and where to place new VMS while avoiding capacity related performance bottlenecks. VKernels products automate the capacity management process. See more at http://www.vkernel.com/products/

2012 VKernel Corporation

http://www.vkernel.com

Anda mungkin juga menyukai