Oracle defines an OCPU as: “An OCPU provides CPU capacity equivalent of one physical core of an Intel Xeon processor with hyperthreading enabled. Each OCPU corresponds to two hardware execution threads, known as vCPUs.” That is the technical definition. OCPU is only available in the Oracle Cloud.
In this post, I will try to explain and visualize the difference between OCPU and vCPU.
A computer’s motherboard contains one or more sockets. A socket is a placeholder for the CPU(s). You attach the CPU(s) with a series of pins. The first picture illustrates two CPUs attached to their sockets running on an Oracle server.
If we “zoom in” one of the CPUs in the next picture. The CPU has 24 cores and 48 threads. Each core has two threads that can execute work simultaneously(hyper-threading). When a core has hyperthreading, it’s considered to have 2 virtual CPUs. But the operating system will treat each vCPU as a single physical CPU.
The Next picture illustrates two different VM:s( virtual machines). Here we can see the difference between the OCPU and the vCPU.
The OCPU represents the number of cores, while the vCPU model represents the number of threads.
So why is this so important?
One metric is price. Maybe you currently using another cloud provider than Oracle? Still on-premises? If you do, then you most likely pay for a lot of vCPUs. The ratio between OCPU and vCPU makes it easy to calculate the cost difference.
Another metric is isolation. Oracle OCPUs don’t share compute resources. So if you buy 1 OCPU you will have two dedicated threads.
I think it is vital to understand what you pay for.
Over & Out