Within VMware vSphere, you have the ability to set CPU Affinity on a particular Virtual Machine (VM). CPU Affinity is where you restrict the virtual machine running on vSphere to a subset of the available processors in a multiprocessor system.
In the image below, you will see a 4 CPU system with 6 cores illustrated. When there is no CPU affinity set, VSphere would allow its Virtual Machine workloads to run on all 4 CPUs and associated cores.
When you set CPU Affinity, you can restrict which CPUs and Associated core vSphere will allow the virtual machine to use.The Official VMware Affinity Statement is located here: https://kb.vmware.com/kb/2145719
To quote a portion of the VMware Affinity Statement: “By specifying a CPU affinity setting for each virtual machine, you can restrict the assignment of virtual machines to a subset of the available processors in multiprocessor systems. By using this feature, you can assign each virtual machine to processors in the specified affinity set.
CPU affinity specifies virtual machine-to-processor placement constraints and is different from the relationship created by a VM-VM or VM-Host affinity rule, which specifies virtual machine-to-virtual machine-host placement constraints.
In this context, the term CPU refers to a logical processor on a hyperthreaded system and refers to a core on a non-hyperthreaded system.
The CPU affinity setting for a virtual machine applies to all of the virtual CPUs associated with the virtual machine and to all other threads (also known as worlds) associated with the virtual machine. Such virtual machine threads perform the processing required for emulating mouse, keyboard, screen, CD-ROM, and miscellaneous legacy devices”.
Why is this important from an Oracle Licensing Perspective?
When you license Oracle software, you are responsible to pay for every place Oracle is Installed and Running. If you were on a 32-processor system, you could take advantage of the set CPU Affinity capability to reduce your Oracle licensing costs quite a bit. You could choose to limit Oracle to only 50% of the available processors. Then you would only need to pay for a 16-processor license, not a 32-processor license.
Let’s examine the before and after costs. The costs are based on the Oracle Technology Global Price List Published on September 27, 2017. At the time of publishing this blog, this list can be obtained at: http://www.oracle.com/us/corporate/pricing/price-lists/index.html
The actual link used to download the price list was http://www.oracle.com/us/corporate/pricing/technology-price-list-070617.pdf
To keep this exercise simple. We will only price out the enterprise edition with no options.
You would save your Organization close to $800,000 dollars. This does not include the annual software maintenance fee or the cost of additional options. The best part: you are not supporting a different infrastructure just to deal with the cost of the database licenses.
Using CPU Affinity is well within the terms of your Oracle contract. A typical LicenseFortress customer is able to save money each and every year by letting us come up with an Optimal License Strategy that meets the needs of your organization in the most cost-effective manner.
Word of Cautions Using CPU Affinity
It is possible through a BIOS setting on the physical server to disable a Processor. Take the example of using CPU Affinity to limit workloads to the first 16 Processors. If CPU-0 were disabled, vSphere would just take the first 16 Processors. So before CPU Affinity was set, CPU0-CPU15 would be utilized. After disabling the BIOS setting CPU0, then vSphere would use CPU16-CPU32. In this example, you would now have an obligation to pay Oracle for the use of the unlicensed processor that it is now installed and running on.
It’s one of the many reasons a license compliancy monitoring solution is so important to every organization. An undisclosed licensing compliancy issue has cost many companies millions of dollars. Don’t let this happen to you.