Guides

CPU cores vs threads: what the difference means, and what a vCPU is

Cores vs threads: a core is a physical unit, a thread is a logical CPU that SMT (Hyper-Threading) adds. What a VPS vCPU is and how to count both on Linux.

Published ~8 min read
On this page

Short answer: a CPU core is a physical processing unit that executes instructions on its own. A hardware thread is an instruction stream a core keeps in flight. With simultaneous multithreading (SMT, Intel’s Hyper-Threading) one core runs two threads that share its execution units, so 8 cores show as 16 threads. Two threads on one core are not two cores.

That last sentence is the whole practical difference. A second thread on a core lets it use time it would otherwise waste waiting for memory, which adds some throughput, but both threads compete for the same arithmetic units and caches. Below: what each one is, what “threading” means in software as well, what a vCPU on a VPS usually is, how to count cores and threads on Linux and Windows, and which workloads want many threads versus a few fast cores.

CoreHardware thread (logical CPU)
What it isA physical execution unit on the chipOne instruction stream a core keeps running
Has its ownExecution units, registers, L1 and usually L2 cacheRegisters and program counter (its architectural state)
SharesL3 cache and memory bandwidth with other coresEverything else with the other thread on the same core
AddsClose to a full unit of throughputA workload-dependent fraction of a core, sometimes nothing
The OS sees it asOne logical CPU per hardware thread it runsOne logical CPU
lscpu fieldCore(s) per socketThread(s) per core

What is a CPU core?

A core is a complete processor in its own right: it fetches instructions, decodes them and executes them with its own integer and floating-point units, registers and first-level cache. A modern server chip puts many of them on one package (the socket), and a server board can hold one or two sockets. Each core can work on a different task at the same moment, which is real parallelism: four cores can finish four independent jobs in roughly the time one core takes for one of them.

What is a thread? Two different meanings

“Thread” means two related things, and most confusion in “cores vs threads” comes from mixing them up.

  • A hardware thread (also called a logical processor or logical CPU) is a slot on a core that can hold one running instruction stream. Without SMT a core has one; with SMT it has two (some IBM POWER chips have four or eight).
  • A software thread is a unit of work inside a program. A process can start dozens or hundreds of them, and the operating system’s scheduler places them onto the hardware threads that are free, switching between them many times a second.

So when people ask “what is threading in a CPU”, they usually mean the hardware feature (SMT), while a developer saying an application is “multi-threaded” means the software kind: the program splits its work so that several cores or hardware threads can run it at once. In htop the rows that repeat one program are usually its software threads (H hides or shows them), and the numbered bars at the top are the hardware threads.

How SMT and Hyper-Threading work

A core spends a surprising share of its time idle: waiting for data from memory, recovering from a mispredicted branch, or simply having no instruction ready for some of its execution units. SMT gives the core a second set of registers and a second program counter, so it can hold two threads and fill those gaps with instructions from whichever thread is ready. Caches, execution units and the memory path stay shared.

How much that adds depends entirely on the workload. As a rough, workload-dependent estimate, mixed server work (web requests, compiling, many database connections) often gains something in the region of 10 to 30 percent more throughput per core with SMT on. Code that already keeps the execution units busy, such as tight numeric loops, gains little, and code whose working set only just fits in the cache can even get slower when a second thread evicts its data. What SMT never does is double a core’s performance.

  • Intel introduced Hyper-Threading in 2002. Several recent client designs dropped it (Core Ultra 200V and 200S, 2024), and hybrid chips mix performance cores with two threads and efficiency cores with one, which is why a desktop part with 8 performance and 8 efficiency cores lists 24 threads rather than 32.
  • AMD has shipped SMT with two threads per core since its Zen architecture in 2017, in desktop and EPYC server parts alike.
  • Arm server chips mostly have one thread per core, so their core count and thread count are the same number.

SMT and security

Because two threads on one core share caches and buffers, the side-channel flaws published in 2018 and 2019 (L1TF and MDS among them) could let one thread infer data from its sibling. OpenBSD switched SMT off by default in 2018, Linux gained a nosmt boot option and, in kernel 5.14, core scheduling, which keeps mutually untrusted tasks off sibling threads. Hypervisors carry their own mitigations. For a single-tenant server, leaving SMT on is the normal choice; check /sys/devices/system/cpu/smt/active to see its state.

Cores vs threads: which matters more?

For parallel work, more physical cores beat the same cores with SMT threads added. Past that, what helps depends on how much of the work can run in parallel at all. Amdahl’s law puts a number on it: if 90 percent of a job parallelises and 10 percent must run in sequence, 8 cores give a speed-up of 1 / (0.1 + 0.9 / 8), about 4.7 times, not 8, and no number of cores gets it past 10 times.

WorkloadScales withWhy
Compiling code (make, cargo, Go builds)Cores and threadsFiles compile independently, so make -j with the logical CPU count keeps every thread busy
Video encoding (ffmpeg with x264 or x265)Cores and threadsFrames and slices are encoded in parallel
Databases with many connectionsCores, then threadsEach query runs on its own worker; one slow query still uses one core
nginx and other event-driven serversCoresOne worker process per core, each handling thousands of connections
Node.js app (one process)Single-core speedJavaScript runs on one event-loop thread; run several processes to use more cores
CPU-bound PythonSingle-core speed per processCPython runs Python code one thread at a time unless you use its optional free-threaded build; scale with processes
Many game serversSingle-core speedThe world simulation (the tick) runs on one main thread

Game servers are the classic case. Minecraft’s Java server, for example, runs its world tick on a single main thread, so a plan with 4 fast cores often holds more players than one with 16 slow ones; running a Minecraft server on a VPS goes into sizing it.

What is a vCPU on a VPS?

On a VPS you rent vCPUs (some providers say vCores), not cores. Under KVM, each vCPU of a virtual machine is a software thread of the QEMU process on the host, and the host’s Linux scheduler runs it on whichever logical CPU is free. In practice that makes one vCPU one hardware thread’s worth of time, not a full physical core, and that is the usual industry meaning, although the exact definition is each provider’s own.

  • Shared vCPUs are the normal VPS model. The host has more vCPUs allocated across its virtual machines than it has hardware threads, on the bet that they are not all busy at once. When they are, your VM waits, and that wait shows up as st (steal) in top. VPS high CPU usage covers how to tell steal from your own load.
  • Dedicated or pinned vCPUs are tied to specific hardware threads that no other VM uses, at a higher price.
  • A dedicated server has no hypervisor in between: every core and thread of the machine belongs to one customer.

Inside a VM, lscpu reports whatever topology the hypervisor presents. A KVM guest often shows Thread(s) per core: 1 and lists every vCPU as a core, which says nothing about whether the host runs SMT underneath. Read the plan description, not the guest’s lscpu, to know what a vCPU is. What is a VPS explains the rest of the model.

How to see cores and threads

On Linux: lscpu and nproc

any Linux
lscpu | grep -E '^(CPU\(s\)|Thread|Core|Socket)'
nproc          # logical CPUs this process may use
nproc --all    # logical CPUs installed
Example output: dual-socket server with SMT
CPU(s):                  56
Thread(s) per core:      2
Core(s) per socket:      14
Socket(s):               2

The arithmetic is always the same: sockets × cores per socket × threads per core = logical CPUs. Here 2 × 14 × 2 = 56 logical CPUs on 28 physical cores. On a KVM VPS with four vCPUs, plain lscpu typically includes these lines (field names as in util-linux 2.38.1, checked in a Debian 12 KVM guest):

Example output: 4 vCPU KVM VPS
CPU(s):                  4
Thread(s) per core:      1
Core(s) per socket:      4
Socket(s):               1
Hypervisor vendor:       KVM
Virtualization type:     full

To see which logical CPUs share a physical core, list the topology per CPU or read the sibling list from sysfs. Two CPU numbers with the same CORE value are SMT siblings:

any Linux
lscpu -e=CPU,CORE,SOCKET
cat /sys/devices/system/cpu/cpu0/topology/core_cpus_list   # e.g. "0,28" with SMT, "0" without
# older kernels name the same file thread_siblings_list
cat /sys/devices/system/cpu/smt/active                      # 1 = SMT on, 0 = off or not available

On Windows: Task Manager and PowerShell

Open Task Manager (Ctrl+Shift+Esc), go to Performance, then CPU. On physical hardware the panel lists Cores and Logical processors; inside a virtual machine it typically shows Virtual processors instead. From PowerShell:

PowerShell
Get-CimInstance Win32_Processor |
  Select-Object Name, NumberOfCores, NumberOfLogicalProcessors

On a Mac, sysctl -n hw.physicalcpu hw.logicalcpu prints the core count and then the thread count.

Common misreadings

  • “16 threads, so 16 cores.” A spec sheet that lists 8C/16T has eight cores. For a sizing estimate, count the cores and treat the extra threads as a modest bonus.
  • A process at 250 % in top. top and htop show a process’s CPU as a share of one logical CPU, so a multi-threaded program on a 4 vCPU server can reach 400 %. That is not an error.
  • Load average without context. A load of 4 means something different on 2 logical CPUs (work is queuing) than on 16 (mostly idle). Compare it with nproc.
  • Thread pools sized to threads, on a busy host. Settings such as worker_processes auto in nginx or make -j$(nproc) count logical CPUs. That is right on a dedicated machine and usually fine on a VPS, but on a heavily shared host fewer workers sometimes finish sooner.

Sizing a server by cores and threads

Start from the workload, not from the biggest number on the page. Parallel jobs (builds, encoding, containers, many small sites) want as many cores or vCPUs as the budget allows. Work that sits in one or two threads (a game world, a trading terminal, a single Node.js process, an API whose latency someone watches) wants fewer, faster cores. Then decide whether shared vCPUs are acceptable or the cores must be yours alone.

At VMHeaven the KVM plans are sold in vCores on a shared platform with no cores reserved per plan. Standard KVM carries the most vCores per euro, 2 to 32 across its ladder, for parallel work. Hi-CPU KVM carries fewer vCores (1 to 14 at the same prices) on AMD EPYC (in Amsterdam the EPYC 7443, a chip with 24 cores and 48 threads), for software that leans on one or two threads. The dedicated servers in Amsterdam have no hypervisor and no neighbours, and the catalog lists the cores and threads of each machine, so you can size a job before you order.

Frequently asked

Is a thread the same as a core?

No. A core is a physical execution unit; a hardware thread is one instruction stream a core runs. With SMT (Intel's Hyper-Threading) one core runs two threads that share its execution units and caches, so the second thread adds a workload-dependent fraction of a core, often in the region of 10 to 30 percent for mixed server work, never a full core.

Is a vCPU a core or a thread?

On most VPS platforms one vCPU is one hardware thread's worth of time on the host, not a whole physical core. Under KVM each vCPU is a thread of the QEMU process that the host scheduler places on any free logical CPU. Providers define the term themselves, so read the plan description; the guest's lscpu output does not show what sits underneath.

How do I check how many cores and threads I have on Linux?

Run lscpu and read CPU(s), Thread(s) per core, Core(s) per socket and Socket(s): sockets times cores per socket times threads per core gives the logical CPU count. nproc prints how many logical CPUs the current process may use, and nproc --all how many are installed.

Do game servers need more cores or faster cores?

Usually faster cores. Many game servers, Minecraft's Java server among them, run the world simulation on one main thread, so single-core speed decides how many players and entities they handle. Extra cores help with world generation, plugins and anything else on the same machine, but not with the main tick.

Related articles

All guides

VPS high CPU usage: find the process and fix the cause

A VPS pinned at 100% CPU: find the process with top and ps, tell real load from steal time and I/O wait, spot a cryptominer, and cap what you keep.

htop explained: CPU bars, sorting, filtering and the top command equivalents

How to read htop: CPU bar colours, load average, memory and steal time, plus the keys to sort, filter, search, tree view and kill, with top equivalents.

What is KVM? The Linux hypervisor behind most VPS hosting, explained

KVM is the hypervisor built into the Linux kernel. How it works with QEMU and libvirt, how to check for it and create a VM, and what a KVM VPS is.

What is nginx? The web server and reverse proxy explained

What is nginx? A free web server, reverse proxy, load balancer and cache. What nginx is used for, nginx vs Apache, its config layout and how to install it.

What is web hosting? Hosting types, and domain vs hosting explained

Domain vs hosting: the domain is your site's address, hosting is the server that stores and serves it. Web hosting meaning, types and how DNS links them.

Linux CPU info: lscpu, /proc/cpuinfo, nproc and CPU temperature

Get CPU info on Linux with lscpu, /proc/cpuinfo and nproc: model, cores, threads, flags like AVX2, clock speed, and CPU temperature with lm-sensors.

Arma 3 server hosting on Linux and Windows: SteamCMD, server.cfg, ports 2302 to 2306 and mods

Arma 3 server hosting on your own VPS: SteamCMD app 233780 with a Steam login, server.cfg, UDP 2302 to 2306, mods and keys, headless clients.