0

My OS is Ubuntu 18.04, my computer cpu is Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz

When I use cat /proc/cpuinfo, I find my cpu has 12 (processor 1 - 11) processors. Every processor has info as below, take process 1 as an example

processor : 1

cpu family : 6
model : 158
model name : Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz stepping : 10
microcode : 0xde
cpu MHz : 800.021
cache size : 12288 KB
physical id : 0
siblings : 12
core id : 1
cpu cores : 6
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 22

We see each processor has 6 cores (cpu cores : 6).

(1) In my opinion, the total number of cores of my computer = #processors * #cores per processor = 12 * 6 = 72 cores . Is that correct understanding?

(2) When I search my cpu Intel(R) Core(TM) i7-8700 CPU info online, I find that the data sheet only says its # of Cores 6 ; # of Threads 12

https://ark.intel.com/content/www/us/en/ark/products/126686/intel-core-i7-8700-processor-12m-cache-up-to-4-60-ghz.html

It does not mention it has 12 processors at all. Why? is it because # of processors is not as important as # of cores?

(3) And what does # of Threads 12 mean, does every core supports running 12 threads simultaneously? Then my computer supports 72*12 threads simultaneously if (1) is correct.

(4) What I have learnt is that there is only one thread running in one core at a specific moment, so multi threads running simultaneously on one core is also possible? If yes, do those threads need to belong to the same process or not?

Thank you so much for your help!

Peter Cordes
  • 328,167
  • 45
  • 605
  • 847
yeehaw
  • 159
  • 2
  • 11
  • A hardware "thread" *is* a logical core. That's why your 6c12t CPU has 12 logical cores that Linux sees. See the SMT / hyper-threading section in http://www.lighterra.com/papers/modernmicroprocessors/ – Peter Cordes Dec 06 '20 at 22:16
  • 1) Your processor has 6 cores. 3) Your 6 core processor can run a total of 12 hardware threads. 4) Each core can run up to 2 hardware threads. The hardware threads do not have to belong to the same process. The operating system plays a large role in determining how efficient your CPU cores can process system or user processes. – Gilbert Le Blanc Dec 06 '20 at 22:31
  • This probably has a duplicate on superuser.com. The Q&As I'm finding on Stack Overflow are more about programming, or how threads run on CPUs, like [What is the relationship between threads (in a Java or a C++ program) and number of cores in the CPU?](https://stackoverflow.com/a/18264644) / [Can a hyper-threaded processor core execute two threads at the exact same time?](https://stackoverflow.com/q/47446725) – Peter Cordes Dec 06 '20 at 22:50
  • Thank you everyone! I basically understand, but I am still confused with the relation between processor and cores. Can a processor have multi-cores? Is it possible for a CPU (idk if should be called cpu, i mean my computer) to have multi real processors while each processor has multi-cores? Alhough I now know when I cat /proc/cpuinfo, the 12 processors the os shows me are not actual physical processors but just means it supports 12 simulatenous threads. – yeehaw Dec 08 '20 at 01:02
  • Yes, multi-socket systems exist, for high-end workstations, and especially for servers. Dual socket is common, 4 or 8 is done when it's important for a single system to have a lot of cores sharing a lot of RAM. – Peter Cordes Nov 12 '22 at 02:04

0 Answers0