Physical core and Logical cores on different cpu AMD/Intel
Asked Answered
F

1

0

Can anyone confirm that for example Intel i3 CPU has 2 physical cores and 4 logical cores, so if I set Process affinity to Core #0 so that means I set on first physical cores 1 logical core, but if I set on Core #1 so it means I set on first physical core 1 HyperThreading core,

But how about AMD CPU, since they have some kind of "modules" at least what I read on internet,

How to work with AMD CPUs?

And does Intel ALWAYS have this same physical core contains 1 logical and 1 HT core?

How about AMD physical core combo?

Festal answered 29/5, 2018 at 8:41 Comment(0)
P
4

Some Intel CPUs have hyperthreading disabled, e.g. quad core i5 CPUs usually have HT disabled. e.g. Skylake desktop chips have 4c8t (4 cores / 8 threads) on the i7 models, 4c4t on the i5 chips (quad core without HT), and 2c4t on the i3 chips (dual core with HT).

Hyperthreading just uses the already-existing way that multi-core / multi-socket SMP systems boot and discover CPUs. An HT-aware OS has to check the physical ID of each CPU to find out which if any of them share a physical core with which other logical CPU.

If you disable HT in the BIOS, the system only presents itself as having one CPU per physical core, instead of 2. (Or 4 in Xeon Phi).


The mapping from logical core to physical core isn't standardized.

On my SKL desktop (i7-6700k in an Asus Z170 Pro Gaming mobo), Linux detects my cores as:

log   phys
 0     0
 1     1
 2     2
 3     3
 4     0
 5     1
 6     2
 7     3

But on a Haswell laptop, it was

log   phys
 0     0
 1     0
 2     1
 3     1

IDK if any system have weirder logical->physical mappings; I think either wrapping


but how about AMD CPU since they got somekind of "modules" atleast what I read on internet

Bulldozer-family uses pairs of weak integer cores sharing a SIMD / FPU unit and some cache, and calls that a "cluster". It's not good for single-threaded workloads (because one of the two integer cores sits idle), but more effecting than Intel's HT when there are enough threads to keep all the cores busy.

Ryzen is a fine-grained SMT (Simultaneous Multithreading) architecture (the generic CPU-architecture term for what HT is) that's very much like Intel's, but with an even wider pipeline.

Ryzen organizes its cores into clusters of 4 which share an L3 cache (https://www.reddit.com/r/hardware/comments/6s1m80/why_did_amd_design_ryzen_as_2_quadcore_ccxs/). There's an interconnect between two or more CCX clusters of cores. This is unrelated to SMT.

Premium answered 29/5, 2018 at 9:28 Comment(5)
Ok so its even more weirder, if we ignore linux core mapping and use only windows core mapping so every second core is HT? And from what I understand about AMD that is bad practice to set work on single "ineger core" so instead I should use first two cores, right?Festal
@JonZ: I have no idea what Windows does. Do you have any evidence that it renumbers to fit a certain pattern, regardless of what order the BIOS presents them? And BTW, both logical cores of a single physical core are equal. It's not like one is the "real one". If the one is idle, the other gets the full execution resources, just like if you booted with HT disabled.Premium
Well I should ask you instead of me since windows only return core count like 2 cores and 4 logical cores and you left just guess it how they maped.Festal
@Festal On Windows, run msinfo32.exe and check the Processor entry. It'll show you the total number of physical cores and total number of logical cores. Each physical core contains the same number of logical cores. So it's just a simple division.Glovsky
AMD modules are comparable to physical cores in Intel processors and AMD cores are comparable to logical cores in Intel processors. Windows shows the number of modules as the number of physical cores and the number of AMD cores as the number of logical cores.Glovsky

© 2022 - 2024 — McMap. All rights reserved.