eli5: cpu cores vs threads?

106 views

The 7950X and 13900K both have the same amount of threads, but does the 13900K having 24 cores against the 7950X’s 16 cores make a difference?

In: 7

4 Answers

Anonymous 0 Comments

[deleted]

Anonymous 0 Comments

In very (*very*) simple terms, a CPU with 24 cores can do 24 “things” at once, where as a CPU with 16 cores can only do 16 “things” at once.

Anonymous 0 Comments

A core is a physical part of the CPU that can work on some stuff independently.

A thread is a sequence of stuff that you want the CPU to do.

A large part of CPU design is based around the fact that CPU cores sit around twiddling their thumbs most of the time, waiting for data to arrive from the cache or from RAM. This is how we developed multithreading, where we tell a CPU core to run multiple threads at once by working on the 2nd thread while the 1st thread is idle and waiting.

The problem is, a single core working on 2 threads at the same time is gonna be slower than 2 separate cores each working on 1 thread at a time. This is because the core has to spend a lot of time switching between the 2 threads. Suppose it takes a core 1 second to finish a thread – with 2 cores, you’d finish both threads in 1 second, but with 1 core that has both threads on it it would take something closer to 1.6 seconds.

This is why using a physical core to run a thread is going to be faster than doubling up threads onto the same cores.

Anonymous 0 Comments

A CPU doesn’t have threads. Threads are a software thing that people unfortunately use to refer to this. When people refer to “how many threads a CPU has” they’re talking about hyperthreading ( name depends on CPU manufacturer ).

Hyperthreading allows a CPU core to perform better by “lying” to the OS and telling it that the CPU has twice the core count. So a 16 core CPU becomes a “24 core” CPU. To make the distinction we call these cores “logical cores” ( vs “physical cores” ) or “threads”.

During operation, sometimes a CPU core needs to idle to wait on a resource, such as while loading a file into memory or waiting for another core to finish something. Since the CPU has nothing to do now, it can start working on another thread until whatever it was waiting for is over.

So hyperthreading is more about time management than amount of cores. You’re still doing one instruction at the same time per core* but hyperthreading still allows one core to do more things in a given time frame. Hence 24 cores/24 threads > 16 cores/24 threads > 16 cores/16 threads.

* Modern processors can execute more than one instruction at the same time per core but that’s out of scope for this answer