> On Nov 30, 2021, at 8:18 AM, Paul M. Foster <pa...@quillandmouse.com> wrote:
>
> On 11/30/21 6:24 AM, Dan Ritter wrote:
>> Paul M. Foster wrote:
>>> Folks:
>>>
>>> Here's a curious thing. I have a 10th gen Intel i3 CPU with four cores. When
>>> I look at /proc/cpuinfo, it actually shows eight cores. There's a line in
>>> the output of each core which is
>>>
>>> cpu cores : 4
>>>
>>> But there are outputs for each of eight cores, numbered 0 through 7.
>>>
>>> Is it possible that there were eight cores on this CPU, and four of them
>>> were non-working (I know it's typical to have non-working cores on a die),
>>> and this file shows all the original cores?
>>>
>>> Or does someone have a better explanation?
>>>
>> Try lscpu. Useful lines:
>> CPU(s): 12
>> On-line CPU(s) list: 0-11
>> Thread(s) per core: 2
>> Core(s) per socket: 6
>> Socket(s): 1
>> So this machine has one socket, 6 cores in the socket, 2 threads
>> per core, which looks like 12 CPUs.
>> You should find that your has one socket, 4 cores in the socket,
>> 2 threads per core, which looks like 8 CPUs.
>> -dsr-
>
> It appears you are correct. lscpu shows this CPU has 4 cores, and 2 threads
> per core. But it shows 8 CPUs. Silly.
>
> Paul
>
Some software, like ninja etc, use that information to decide how many parallel
jobs to set up. On my systems (2 processors, 6 CPUs on each, each with two
threads per core = 12 parallel build processes) that works out well it seems.
Ken