Do the virtualization math: When four CPUs aren't four CPUs

Four virtual cores or four virtual sockets, what's the difference? It could be a lot

Page 2 of 2

This is fairly basic, sort of like how it's quicker to go to the store across the street rather than one across town. However, when you insert a hypervisor underneath an OS, the relationships between CPU cores and RAM allocations can get a bit murky.

Depending on how the hypervisor presents CPUs to the virtual server, the OS may think that each CPU has its own memory controller or there's a shared memory controller across four cores, for example. Underneath that, the hypervisor is constantly polling virtual server memory allocation status and assessing whether to move active memory closer to the CPU currently handling the load for that VM. There can be cases where performance dips due to all of these factors, and the fact that they're occurring at once.

Straw into gold
Fortunately, there's a way to tell which method suits your workload best -- test the hell out of it. Build up several virtual servers, each with a different virtual CPU layout, and run a sample workload. Look into deeper tweaks you can make regarding NUMA allocations at the hypervisor level, and test various scenarios by tweaking those parameters.

For instance, VMware vSphere has deep tuning parameters, such as numa.vcpu.maxPerMachineNode and numa.vcpu.maxPerClient, which allow you to adjust the maximum number of virtual CPUs that can reside on a single NUMA node and the maximum number of virtual CPUs that are rebalanced as a single unit by the hypervisor. There are several other parameters as well that may have a greater impact in your specific case, but the fact is that you may be able to boost your workload performance with a few tiny tweaks and some testing.

This isn't a new concept. I noted this type of performance tweak 18 months ago in the last InfoWorld virtualization shoot-out, specifically with respect to Red Hat Enterprise Virtualization, but it's a bit of knowledge that I find goes largely overlooked. So when you're building and tweaking your virtual machines, remember that four doesn't always equal four when you're talking about virtual CPUs. Spending a little time testing can save a lot of time processing.

This story, "Do the virtualization math: When four CPUs aren't four CPUs," was originally published at Read more of Paul Venezia's The Deep End blog at For the latest business technology news, follow on Twitter.

| 1 2 Page 2