Even if you don’t know much about computers, you’ve probably heard the term CPU. The Central Processing Unit, or CPU, is an important component of every system, from your home laptop to the servers that host your company’s website. But what is a CPU, and what role does it play in your system’s infrastructure? Are cores and virtual CPUs the same thing? Isn’t Multithreading a good idea?
We’ll look at the functions of a CPU, the roles and differences between physical and logical cores, and why the vCPU promised by major cloud providers isn’t all it’s cracked up to be in this analysis.
What is a CPU?
The Central Processing Unit, also known as the Processor, is your computer’s brain. It’s in charge of delegating tasks, interpreting instructions, and performing calculations. The instructions you send through the mouse and keyboard are interpreted by the CPU and delegated out when you tell your computer to do something, such as load a video. The CPU would have handled the execution of these tasks on its own in early computers.
Other components, such as the GPU, in modern hardware, process certain actions themselves. As a result, modern CPUs have evolved to take on a more supervisory role, performing fewer calculations directly while still overseeing task completion.
Chipsets are integrated circuits that link your computer’s CPU to RAM, storage, and any external devices like a keyboard. A series of Chipsets handled this communication process between you and your system’s CPU before the rise of smartphones and tablets. SOC (Systems on Chips) solutions have all but replaced chipsets as technology has continued to shrink, allowing for smaller and more efficient CPUs.
SOC is a single-chip solution that includes the CPU, GPU, Memory, and other components, making it a faster and more space-efficient alternative to multi-chip solutions. The result of combining all of these hardware and software components onto a single chip is a processor that is faster and more reliable.
However, as the number of large, hyperscale data centers grows in the coming years, the CPU’s functionality will dwindle even more. The DPU (Data Processing Unit) will soon overtake the CPU as the true “Processor” in most large systems in order to manage the sprawling infrastructure of these massive facilities and the hundreds of CPUs that combine to make them. The CPU, on the other hand, remains the primary means of processing instructions for general-purpose computing, at least for the time being.
Consider it this way: you, the user, are the company’s CEO. Your CPU is a group of people who work in middle management. You don’t do it yourself when something needs to be done; that isn’t the CEO’s job. You make decisions and issue orders. You decide what needs to be done, and your bosses handle the details.
They crunch the numbers and figure out which departments (other parts of your computer) need to do what to complete the project as quickly and efficiently as possible. They aren’t doing everything themselves, but they are still in charge of overseeing the various pieces as they move through your various departments. This is what your computer’s Processor does. It is a catalyst for change. Only much, much, faster than this.
On a technical level, the way CPUs are built why your computer can process so many complex functions quickly and simultaneously. A CPU is a chip installed into a socket on your system’s motherboard and contains billions of tiny transistors. These transistors act like light switches, turning on and off in response to incoming binary 1s and 0s. At its most basic level, this is what enables your computer to perform all of its functions.
However, as technology advances, our transistors become smaller and smaller, causing these chips to become faster and faster. As a result, more can be packed into a single chip, and processing power increases.
So, what is a core if a CPU is a chip full of tiny transistors?
What is a Core?
Single-core CPUs were the norm when the first ones were created. However, as previously stated, processing technology is shrinking. A single chip is installed in a single socket on the motherboard. This means that we can pack more information into a single chip. It also means that multiple CPUs can be crammed into a single socket. This is where the term “core” comes into play.
A Physical Core is a single-socket CPU that is contained on a chip. A quad-core processor contains four CPUs on a single chip. You have eight cores if you have an octa-core processor. To put it another way, each core in your system is like having an extra brain to process commands with.
As a result, each core in your computer can handle a different task simultaneously. The more processes you can complete simultaneously, the faster your overall completion rate will be. Cores aren’t the only factor affecting your system’s speed, but for machines performing resource-intensive tasks like AI, having more cores can make a significant difference.
The problem is that not all cores are created equal. As the technology used in our processors grows more powerful, it also grows more subtle in its distinctions. Determining your system’s true processing power becomes a little more complicated.
Threading? What are virtual cores? Are these all semantic differences, or are there any that you should be aware of?
Let’s take a look at all these terms.
Physical Cores vs. Logical Cores
To comprehend the differences between CPU types and components, you must first distinguish between physical and logical cores. A physical core, also known as a physical CPU, is a hardware component of the CPU chip identical to the cores discussed previously. The quad-core Processor in your home computer has four physical cores.
Each core is the equivalent of a separate CPU, but instead of installing four separate chips into four different sockets, the cores allow you to store them all on the same chip. These are the cores that determine the true capabilities of your system, determining how many resources are available to process instructions.
There are also logical cores. A logical core, also known as a logical CPU or virtual core, is a term used by operating systems to describe how they view processors that use Simultaneous Multithreading (SMT). Multithreading (or Hyperthreading, as Intel refers to their simultaneous multithreading technology) is a method for superscalar CPUs to split sets of instructions, known as Threads, allowing multiple processes to run on a single cycle.
When a CPU has a two-way SMT, each core can run two threads at the same time. A 4 core / 8 thread CPU is a quad-core superscalar CPU with two-way SMT. Because this threading allows the system to handle up to eight tasks simultaneously, the machine’s operating system considers it to have eight logical cores. In this sense, logical core is primarily used to describe the interaction between your system’s hardware and multithreading when processing instructions.
On the other hand, is a logical core the same as a physical core or Processor?
What is Multithreading?
Let’s return to our example of middle management. You, the CEO, delegate a task to your management team, which divides and conquers the problem as quickly as possible. One of these tasks requires your factory workers to promptly assemble a series of two different mechanical parts in a high-volume manner.
You only have one production line and a limited number of employees. The task can only be completed so quickly because your resources are limited. After all, your central nervous system can only handle so much at a time.
However, suppose you add a second supervisor to this department. You still have the same number of employees, i.e., system resources, but your department has been divided into two teams, each with two leaders, each in charge of a separate task. These tasks represent your threads.
These tasks would have to be completed in order on a non-multithreaded CPU, each one starting only after the previous task was completed completely.
On the other hand, Multithreading allows your machine to handle multiple tasks at once. They’re not really running at the same time, but rather in the same cycle, working around each other’s schedules to complete all of the tasks as quickly as possible.
So, how does this distinction manifest itself?
Your two production teams utilize the same line to achieve two distinct goals. Because the production line is a physical object, it can only accommodate a certain number of people at any given time. However, each team’s basic components, the parts of the whole, do not entirely overlap.
Assume that Team 1’s task requires them to wait for a component that another department provides. Because Team 1 cannot move forward without the part they’re waiting for; this results in downtime on the production line. This delay in Task 1 would cause a delay in Task 2 in a non-multithreaded environment. Before starting Task 2, your employees would have to wait for Task 1 to finish.
However, Team 2 does not have to wait in the multithreaded two-team version of this scenario. If Team 1 is stalled and not using the production line, Team 2 can step in and finish their task while Team 1 awaits the arrival of its missing components.
You haven’t increased your overall available resources in this scenario, but you are making better use. Your productivity and speed improve. Threading serves this purpose.
Simultaneous Multithreading allows your processors to process multiple lines of commands simultaneously, making them faster. Even though resource availability remains constant, the number of channels for processing instructions grows.
If thread 1’s task is delayed, rather than sitting idle, a second, faster thread can take advantage of the available resources and complete its task while thread 1 is still waiting. By threading a core, you’re essentially increasing its efficiency.
Now, in an ideal world, wouldn’t these threads double the output of your cores? Isn’t it true that they’re twice as effective?
While Multithreading allows your processors to handle more complex commands, it is not the same as having twice as many physical cores available. After all, there will always be some resource overlap, even if your cores are more efficient. When a process necessitates the full resources of a specific core, whether it’s threaded or not makes only a minor difference.
This isn’t to say, however, that Multithreading isn’t useful. The increased logical processor threading yields unquestionably improve the efficiency of your system. However, just because a quad-core with Multithreading is faster than four cores without it doesn’t mean it’s an octa-core processor.
Is that level of processing power required for everyone? No. However, for those who do, this distinction is significant.
So, what is vCPU if a logical processor isn’t the same as a core?
What is a vCPU?
If you’ve heard of virtual CPUs (vCPUs), you or your company are probably customers of a public cloud provider like Amazon Web Services (AWS) or Google Cloud. Cloud IaaS providers use the term vCPU, or virtual CPU, to describe the computing power of their services. In our article Is Your Cloud Too Expensive? We discuss this briefly in our analysis of the big three public cloud providers.
The AWS c5d.2xlarge build we compared in that article, for example, is listed as having 8 virtual CPUs. These, however, are virtual cores, not physical cores. As previously stated, a virtual core is not the same as a physical core. As a result, 8 vCPU reflects its logical processing power rather than its physical hardware. What you’re getting is access to a small portion of it.
AWS and other public cloud providers use hypervisors to divide their servers into multiple virtual machines (VMs), selling to users as separate instances. This can be done with or without SMT, but when both are used together, a single physical core can be split into many different vCPUs. Threads x Cores x Sockets = Max vCPU is the standard formula for determining the maximum number of vCPUs a server can create before overselling its resources.
So, if you have a four-core server with two-way threading on a single socket, you can theoretically split it into 32 virtual CPUs without creating a bottleneck (8threads x 4cores x 1socket). If you have a Dual e5 2620v4 server with two-way SMT, you could have up to 256 virtual CPUs on a single server (16threads x 8cores x 2sockets). On a single machine, that’s a lot of virtual machines.
Another way to consider this is to return to our production line analogy. For this, we’ll use our 4 core / 8 thread / 32 vCPU example.
Assume your factory has four production lines (cores), and your employees are divided into two teams for each production line (Multithreading). You now have four lines and eight teams working on eight different tasks. However, according to our formula, up to 32 teams (vCPUs) should be able to operate these four production lines if they are used efficiently, as long as resource overlap is kept to a minimum.
In essence, the hypervisor allows you to divide these teams further, allowing you to tackle an even more significant number of tasks at the same time. This is accomplished by splitting each VM’s threads across multiple cores and efficiently utilizing whichever pipeline is available.
In other words, vCPU creation is essentially a secondary version of SMT.
Can we say that vCPU is equivalent to a physical CPU if a server with 16 logical processors can support up to 256 virtual machines at once? After all, while it’s unlikely that all 256 of those instances will require access to those logical cores simultaneously, it’s not out of the realm of possibility.
As a result, when comparing the 8 vCPU AWS c5d.2xlarge unit, we compare it to one of our 4 core / 8 thread servers rather than a true Octa-core server. This is because physical and logical cores are not the same. While most users will be satisfied with a processor like this, those who require 8 physical cores of processing power should be aware that the two are not the same.
The terminology used can be intentionally deceptive at times. A virtual central processing unit (vCPU) is not the same as a core.
Is vCPU equal to Physical CPU?
In summary? No. That isn’t to say that vCPU isn’t a good option. A system with 8 virtual CPUs will run more efficiently than one with four. It just doesn’t compare to having eight physical cores. The goal of this analysis isn’t to discredit vCPU; instead, it’s to ensure that everyone understands the difference between physical and logical processing.
While more logical processors can be beneficial, your physical cores, storage subsystem, and RAM are what determine your system’s true resource limitations. It’s critical to understand the role of these subtle distinctions when making infrastructure and hardware decisions. After all, in a field so steeped in jargon, it’s too easy to lose track of the differences between one keyword and the next. Some service providers take advantage of this. It’s easier to overpromise and underdeliver if their customers don’t know the difference.
We know that a happy and successful customer is one who is well-informed. When our clients achieve success, we achieve success as well.
So, if you’re interested in learning more about how a dedicated server or private cloud solution from SeiMaxim can help you and your company, give us a call or start a live chat with one of our sales representatives today.
SeiMaxim provides instant and customized solutions to your needs, whether you require four physical cores or twenty. It’s all part of our mission to give the hosting industry a more human touch. Take control of your infrastructure by signing up today.
SeiMaxim is the hosting partner you can trust, and it’s not a virtual relationship.