Book Image

vSphere High Performance Cookbook

Book Image

vSphere High Performance Cookbook

Overview of this book

VMware vSphere is the key virtualization technology in today's market. vSphere is a complex tool and incorrect design and deployment can create performance-related problems. vSphere High Performance Cookbook is focused on solving those problems as well as providing best practices and performance-enhancing techniques. vSphere High Performance Cookbook offers a comprehensive understanding of the different components of vSphere and the interaction of these components with the physical layer which includes the CPU, memory, network, and storage. If you want to improve or troubleshoot vSphere performance then this book is for you! vSphere High Performance Cookbook will teach you how to tune and grow a VMware vSphere 5 infrastructure. This book focuses on tuning, optimizing, and scaling the infrastructure using the vSphere Client graphical user interface. This book will enable the reader with the knowledge, skills, and abilities to build and run a high-performing VMware vSphere virtual infrastructure. You will learn how to configure and manage ESXi CPU, memory, networking, and storage for sophisticated, enterprise-scale environments. You will also learn how to manage changes to the vSphere environment and optimize the performance of all vSphere components. This book also focuses on high value and often overlooked performance-related topics such as NUMA Aware CPU Scheduler, VMM Scheduler, Core Sharing, the Virtual Memory Reclamation technique, Checksum offloading, VM DirectPath I/O, queuing on storage array, command queuing, vCenter Server design, and virtual machine and application tuning. By the end of this book you will be able to identify, diagnose, and troubleshoot operational faults and critical performance issues in vSphere.
Table of Contents (15 chapters)
vSphere High Performance Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Hyperthreaded core sharing


The Hyperthreaded (HT) core sharing option enables us to define the different types of physical core sharing techniques with the virtual machines.

A Hyperthreaded processor (or lCPU) has the same number of function units as an older, non-Hyperthreaded processor. HT offers two execution contexts, so that it can achieve better function unit utilization by letting more than one thread execute concurrently. On the other hand, if you're running two programs which compete for the same function units, there is no advantage at all on having both running concurrently. When one is running, the other is necessarily waiting on the same function units.

A dual core processor has two times as many function units as a single-core processor, and can really run two programs concurrently with no competition for function units. A CPU socket can contain multiple cores. Each core can do CPU-type work. Twice as many cores will be able to do (roughly) twice as much work. If a core also has Hyperthreading enabled, then each core has two logical processors. However, two lCPUs cannot do twice as much work as one.

Getting ready

To step through this recipe, you need a running ESXi Server, a running virtual machine, VMware vCenter Server, and a working installation of vSphere Client. No other prerequisites are required.

How to do it...

Let's get started:

  1. Open up VMware vSphere Client.

  2. Log in to the vCenter Server.

  3. From the home screen, navigate to Hosts and Clusters.

  4. Expand the left-hand navigation list.

  5. Navigate to any one of the virtual machine.

  6. Right-click on the virtual machine and select Edit Settings.

  7. Click on the Resources tab.

  8. Click on Advanced CPU.

  9. Under Hyperthreaded Core Sharing, use the drop-down list to select any one of the available options.

There are three different HT sharing methods, as follows:

  • Any

  • None

  • Internal

How it works...

The following table elaborates the three methods of core sharing:

Option

Description

Any

The default for all virtual machines on a Hyperthreaded system. The virtual CPUs of a virtual machine with this setting can freely share cores with other virtual CPUs from this or any other virtual machine at any time.

None

Virtual CPUs of a virtual machine should not share cores with each other or with virtual CPUs from other virtual machines. That is, each virtual CPU from this virtual machine should always get a whole core to itself, with the other logical CPUs on that core being placed into the halted state.

Internal

This option is similar to none. Virtual CPUs from this virtual machine cannot share cores with virtual CPUs from other virtual machines. They can share cores with the other virtual CPUs from the same virtual machine. You can select this option only for SMP virtual machines. If applied to a uniprocessor virtual machine, the system changes this option to none.

These options have no effect on the fairness or CPU time allocation. Regardless of a virtual machine's hyperthreading settings, it still receives CPU time proportional to its CPU shares, and constrained by its CPU reservation and CPU limit values.

There's more...

If there are running VMs on the same virtual infrastructure cluster with different numbers of vCPU (for example, one vCPU and two vCPUs) then there is a good chance that one vCPU of your dual vCPU VM can work alone on one physical CPU and the other vCPU has to share a physical CPU with another VM. This causes tremendous synchronization overhead between the two vCPUs (you don't have this in physical multi-CPU machines because this sync is hardware based) which can cause the system process within the VM to go up from 50 percent to 100 percent CPU load.