Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
vSphere High Performance Cookbook - Second Edition

You're reading from   vSphere High Performance Cookbook - Second Edition Recipes to tune your vSphere for maximum performance

Arrow left icon
Product type Paperback
Published in Jun 2017
Publisher
ISBN-13 9781786464620
Length 338 pages
Edition 2nd Edition
Tools
Arrow right icon
Authors (3):
Arrow left icon
Christopher Kusek Christopher Kusek
Author Profile Icon Christopher Kusek
Christopher Kusek
Prasenjit Sarkar Prasenjit Sarkar
Author Profile Icon Prasenjit Sarkar
Prasenjit Sarkar
Kevin Elder Kevin Elder
Author Profile Icon Kevin Elder
Kevin Elder
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. CPU Performance Design 2. Memory Performance Design FREE CHAPTER 3. Networking Performance Design 4. DRS, SDRS, and Resource Control Design 5. vSphere Cluster Design 6. Storage Performance Design 7. Designing vCenter on Windows for Best Performance 8. Designing VCSA for Best Performance 9. Virtual Machine and Virtual Environment Performance Design 10. Performance Tools

CPU performance best practices

CPU virtualization adds varying amounts of overhead. Because of this, you may need to fine-tune the CPU performance and need to know what the standard best practices are.

The following are the standard CPU performance best practices:

  • You need to avoid using SMP VMs unless it is required by the application running inside the guest OS. This means if the application is not multithreaded, then there is no benefit of using the SMP VM.
  • You should prioritize VM CPU usage with a proportional share algorithm.
  • Use Distributed Resource Scheduler (DRS) and vMotion to redistribute VMs and reduce contention.
  • Use the latest available virtual hardware for the VMs.
  • Reduce the number of VMs running on a single host. This way, you can not only reduce contention, but also reduce the fault domain configuration.
  • You should leverage the application-tuning guide from the vendor to tune your VMs for best performance.

Getting ready

To step through this recipe, you need a running ESXi Server (licensed with Enterprise Plus for DRS), a couple of running VMs, and vSphere Web Client. No other prerequisites are required.

How to do it...

Let's get started:

  1. For the first best practice, you need to check whether the application is single threaded or multithreaded. If it is single threaded, then avoid running an SMP VM:
    1. You need to log in to vCenter using vSphere Web Client, then go to the Home tab.
    2. Once there, go to the VM and look at the VM Hardware tile.
    3. Now you can see whether the VM has one vCPU or multiple vCPUs. You see whether it's using them by looking at %Utilization or a similar metric for each vCPU:
This Summary tab doesn't tell us whether the app is single threaded or multithreaded.
  1. For the second best practice, you need to prioritize the VM CPU using shares and reservation. Depending on the customer SLA, this has to be defined:
    1. You need to log in to vCenter using vSphere Web Client, then go to the Home tab.
    2. Once there, go to the VM, right-click on it, and then select Edit Resource Settings.
    3. In the CPU section, you need to define the Shares and Reservation values depending on your SLA and the performance factors.

By default, ESXi is efficient and fair. It does not waste physical resources. If all the demands could be met, all is well. If all the demands are not satisfied, the deprivation is shared equitably among VMs by default.

VMs can use and then adjust the shares, reservation, or limit settings. But be sure that you know how they work first:

  1. For the third best practice, you need to have a vSphere Cluster and have DRS enabled for this. DRS will load balance the VMs across the ESXi hosts using vMotion.

The first screenshot shows that the DRS is enabled on this vSphere Cluster:

The second screenshot shows the automation level and migration threshold:

  1. For the fourth best practice, you first need to see what virtual hardware the VM is running on; if it is not current, then you need to upgrade it. A virtual hardware version can limit the number of vCPUs:
    1. You need to log in to vCenter using vSphere Web Client, then go to the Home tab.
    2. Once there, go to Hosts and Clusters, then click on VM and look at the VM Hardware tile.

In the following example, it is version 10, which is old, and we can upgrade it to version 13.

Take a VM snapshot prior to upgrading in order to mitigate the rare occurrence of a failure to boot the guest operating system after upgrading.
For further information, refer to https://kb.vmware.com/kb/1010675.
  1. Now, to upgrade the virtual hardware of a VM, it has to be powered off. Then, start it again, right-click on VM, go to Compatibility, and then Upgrade VM Compatibility. It should give you a warning:

  1. Once you click on Yes, the virtual hardware version will be upgraded.
  1. For the fifth recommendation, you need to limit the number of vCPUs required by the VMs that would run on the host and the number of sockets/cores available in each physical host:
    1. Try to balance the CPU load of your VMs across all of your hosts
    2. Monitor the VMs for performance and adjust as necessary.
  2. For the last recommendation, you need to get the vendor-application-tuning guide and follow that to tune your virtual environment. A typical example is Microsoft Exchange Server 2016 Best Practices Guide.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime