# vCPU Placement

vCPU placement settings relate to vCPU placement within the physical topology of the CPU. Since a vCPU is just a schedulable thread the hypervisor maps onto physical cores, we can create performance increases through smart scheduling. A simplified CPU topology might look something like this:

```
```
Socket  
 └── NUMA node  
     └── Core  
         └── Threads (SMT / Hyper-Threading)
```
```

As you can see from the diagram above, multiple physical cores can reside within the same NUMA node. Physical CPU cores within the same NUMA node share the same region of the L3 cache and local memory access. By scheduling vCPUs making up a single VM to cores within the same NUMA node, we can avoid the performance penalties associated with crossing NUMA boundaries and accessing remote memory locations.

HVM Clusters offer three vCPU placement settings. The default setting is **Unmanaged**. Clusters with unmanaged vCPU placement will make no special effort to schedule vCPUs within the same NUMA region. Next is **Region**. Clusters with this vCPU placement will attempt to schedule vCPUs associated with the same VM within the same NUMA region. When flexibility is needed, vCPUs may hop to different physical cores but they will be kept within the same NUMA region. Third is **Pinned**. Clusters with this vCPU placement will also attempt to schedule vCPUS associated with the same VM within the same NUMA region but the vCPUs will remain pinned to same cores. In certain cases, pinning may improve performance and in other cases creating inflexibility may introduce inefficiency.

TIP

Setting **Region** placement is a sensible starting configuration if you don't have a specific reason to choose one of the other two. In internal testing, a 7-10% improvement in prime number generation time was observed with Region pinning versus Unmanaged pinning.

How to Configure vCPU Placement Settings

1. Navigate to Infrastructure > Clusters
2. Select the desired HVM Cluster
3. From the Cluster detail page, click Edit
4. Within the vCPU Placement field, select the desired value. See the paragraphs above for a description of each configuration
5. Click Save changes
