Number of processor cores confusion
Karl Auer
kauer at biplane.com.au
Tue Nov 10 09:28:09 UTC 2020
On Mon, 2020-11-09 at 18:28 +0100, Volker Wysk wrote:
> When I bought my PC a few months ago, I was told that it has 8
> processor cores. But the gnome system monitor display 16 cores. So
> does /proc/cpuinfo.
It has 8 cores, but each core can run two threads. The OS is told it
has 16 cores, because it needs to be able to distribute tasks across
those cores. If it needs to find out the truth, it can.
See this to see the situation stated clearly:
https://www.amd.com/en/products/cpu/amd-ryzen-7-5800x
See this for a good explanation of what's going on:
https://www.howtogeek.com/194756/cpu-basics-multiple-cpus-cores-and-hyper-threading-explained/
In summary, you can run 8 things genuinely in parallel on your 8 cores.
But each core can run two things not-really-in-parallel-but-they-think-
they-are by timeslicing between the threads on the core.
The total number of available cycles is the same for one, two or twenty
threads on the same core. By threading, the core can ensure that more
of those cycles are spent doing actual work, while one or the other
thread is waiting on something - disk, RAM, a keypress or whatever. So
threading gives you a performance boost for many workloads.
Regards, K.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D
More information about the ubuntu-users
mailing list