2

I have a system with an I3-3220 which based on Intel's info has 2 cores capable of 4 threads each (or total). However I noticed while watching htop with an avconv encode running that there were 16 logical threads assigned. I searched and read numerous posts both here and on U&L and based on what I read I tried

sudo dmidecode |egrep "Socket Designation: Proc|((Thread|Core) Count)"

which resulted in:

Core Count: 2
Thread Count: 2

So 4 logical cpus total.

But lscpu gives me:

Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 58
Stepping:              9
CPU MHz:               3300.000
BogoMIPS:              6606.60
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K

So 8 logical cpus total.

But sudo lshw -C cpu returns:

  *-cpu:0
       description: CPU
       product: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
       vendor: Intel Corp.
       physical id: 43
       bus info: cpu@0
       version: 6.10.9
       serial: 0003-06A9-0000-0000-0000-0000
       slot: Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
       size: 3300MHz
       capacity: 3300MHz
       width: 64 bits
       clock: 100MHz
       capabilities: x86-64 boot fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms cpufreq
       configuration: cores=2 enabledcores=1 id=0 threads=2
     *-logicalcpu:0
          description: Logical CPU
          physical id: 0.1
          width: 64 bits
          capabilities: logical
     *-logicalcpu:1
          description: Logical CPU
          physical id: 0.2
          width: 64 bits
          capabilities: logical
     *-logicalcpu:2
          description: Logical CPU
          physical id: 0.3
          width: 64 bits
          capabilities: logical
     *-logicalcpu:3
          description: Logical CPU
          physical id: 0.4
          width: 64 bits
          capabilities: logical
     *-logicalcpu:4
          description: Logical CPU
          physical id: 0.5
          width: 64 bits
          capabilities: logical
     *-logicalcpu:5
          description: Logical CPU
          physical id: 0.6
          width: 64 bits
          capabilities: logical
     *-logicalcpu:6
          description: Logical CPU
          physical id: 0.7
          width: 64 bits
          capabilities: logical
     *-logicalcpu:7
          description: Logical CPU
          physical id: 0.8
          width: 64 bits
          capabilities: logical
     *-logicalcpu:8
          description: Logical CPU
          physical id: 0.9
          width: 64 bits
          capabilities: logical
     *-logicalcpu:9
          description: Logical CPU
          physical id: 0.a
          width: 64 bits
          capabilities: logical
     *-logicalcpu:10
          description: Logical CPU
          physical id: 0.b
          width: 64 bits
          capabilities: logical
     *-logicalcpu:11
          description: Logical CPU
          physical id: 0.c
          width: 64 bits
          capabilities: logical
     *-logicalcpu:12
          description: Logical CPU
          physical id: 0.d
          width: 64 bits
          capabilities: logical
     *-logicalcpu:13
          description: Logical CPU
          physical id: 0.e
          width: 64 bits
          capabilities: logical
     *-logicalcpu:14
          description: Logical CPU
          physical id: 0.f
          width: 64 bits
          capabilities: logical
     *-logicalcpu:15
          description: Logical CPU
          physical id: 0.10
          width: 64 bits
          capabilities: logical
  *-cpu:1
       physical id: 1
       bus info: cpu@1
       version: 6.10.9
       serial: 0003-06A9-0000-0000-0000-0000
       size: 3GHz
       capacity: 3GHz
       capabilities: vmx ht cpufreq
       configuration: id=0
     *-logicalcpu:0
          description: Logical CPU
          physical id: 0.1
          capabilities: logical
     *-logicalcpu:1
          description: Logical CPU
          physical id: 0.2
          capabilities: logical
     *-logicalcpu:2
          description: Logical CPU
          physical id: 0.3
          capabilities: logical
     *-logicalcpu:3
          description: Logical CPU
          physical id: 0.4
          capabilities: logical
     *-logicalcpu:4
          description: Logical CPU
          physical id: 0.5
          capabilities: logical
     *-logicalcpu:5
          description: Logical CPU
          physical id: 0.6
          capabilities: logical
     *-logicalcpu:6
          description: Logical CPU
          physical id: 0.7
          capabilities: logical
     *-logicalcpu:7
          description: Logical CPU
          physical id: 0.8
          capabilities: logical
     *-logicalcpu:8
          description: Logical CPU
          physical id: 0.9
          capabilities: logical
     *-logicalcpu:9
          description: Logical CPU
          physical id: 0.a
          capabilities: logical
     *-logicalcpu:10
          description: Logical CPU
          physical id: 0.b
          capabilities: logical
     *-logicalcpu:11
          description: Logical CPU
          physical id: 0.c
          capabilities: logical
     *-logicalcpu:12
          description: Logical CPU
          physical id: 0.d
          capabilities: logical
     *-logicalcpu:13
          description: Logical CPU
          physical id: 0.e
          capabilities: logical
     *-logicalcpu:14
          description: Logical CPU
          physical id: 0.f
          capabilities: logical
     *-logicalcpu:15
          description: Logical CPU
          physical id: 0.10
          capabilities: logical

Which appears to indicate 16 logical cpus at bus info: cpu@0 + 16 more at bus info: cpu@1 and that only 1 core is enabled. To further confuse the issue cat /proc/cpuinfo returns:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 58
model name  : Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
stepping    : 9
microcode   : 0x10
cpu MHz     : 2800.000
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
fdiv_bug    : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips    : 6606.60
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 58
model name  : Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
stepping    : 9
microcode   : 0x10
cpu MHz     : 2400.000
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 2
apicid      : 2
initial apicid  : 2
fdiv_bug    : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips    : 6606.60
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 58
model name  : Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
stepping    : 9
microcode   : 0x10
cpu MHz     : 2600.000
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 1
initial apicid  : 1
fdiv_bug    : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips    : 6606.60
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 58
model name  : Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz
stepping    : 9
microcode   : 0x10
cpu MHz     : 3300.000
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 2
apicid      : 3
initial apicid  : 3
fdiv_bug    : no
f00f_bug    : no
coma_bug    : no
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx f16c lahf_lm arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips    : 6606.60
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
power management:

Which appears to me to be indicating CPUs 0-3 with 4 siblings each so 16 logical CPU's

Why do these results seem to vary so much and which is to be trusted?

Bonus question: If I do indeed only have 1 of 2 cores enabled how do I enable the second one?

1 Answer 1

4

"based on Intel's info has 2 cores capable of 4 threads each"

Not quite, it says 2 cores and 4 threads not 4 threads per core, this means it has 2 cores each with 2 threads for a total of 4 threads.

I have an i3-2100 dual core, it is comparable to yours, the first command

sudo dmidecode |egrep "Socket Designation: Proc|((Thread|Core) Count)"

Gives me the same result, 2 cpu cores, each with 2 threads

lscpu

says I have

CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1

I think you just misread that because it says 4 cpus but it means the total threads, it is a bad choice of terms, I was confused too when I first looked :).

You have 1 socket, 2 cores and 2 threads per core and it reports that as 4 cpus total, so that is correct.

As for the 16 logical cores in cat /proc/cpuinfo mine is the same, 4 cpu each with 4 siblings but I had no idea what that means, so I looked it up and found this at server fault

The number of siblings on a processor is the total number of execution units within that processor. This will include both additional cores and hyperthreading.

For example,

A Core 2 Duo will list siblings : 2. Dual core, no hyperthreading.
A Xeon E5420 will list siblings : 4. Dual core, with hyperthreading.
A Pentium 4 with hyperthreading will list siblings : 2. Single core, with hyperthreading.

So it would seem that the information is correct, you have 4 total threads so each one plus its siblings is 4 total and it would seem this is just reported individually for each thread.

As for sudo lshw -C cpu my output was very diffrent, just

*-cpu                   
       product: Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz
       vendor: Intel Corp.
       physical id: 1
       bus info: cpu@0
       size: 1614MHz
       capacity: 3100MHz
       width: 64 bits
       capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 popcnt tsc_deadline_timer xsave avx lahf_lm arat epb pln pts dtherm tpr_shadow vnmi flexpriority ept vpid xsaveopt cpufreq

Are you sure that is the command you ran?

"Why do these results seem to vary so much and which is to be trusted?"

They don't vary, they just have different ways of displaying the information, I would just use lscpu as the most "trusted" because it is the easiest to read and should have any information you need but they all are correct.

"Bonus question: If I do indeed only have 1 of 2 cores enabled how do I enable the second one?"

Both your cores are active and hyper threading is enabled, you can turn off hyper threading in your bios in the hardware section, this should nicely half the cpu count so you can check the difference easily in a terminal with lscpu.

To disable and enable a single core use these commands

Disable:

echo 0 | sudo tee /sys/devices/system/cpu/cpu0/online

Enable:

echo 1 | sudo tee /sys/devices/system/cpu/cpu0/online

The part cpu0 is the first line processor in cat /proc/cpuinfo, just swap the 0 for the core / thread you wish to disable.

1
  • Re: "As for sudo lshw -C cpu my output was very diffrent" Yes. Certain ran it again to be sure. Do you suppose running a 32 bit OS on a 64-bit CPU has any bearing on avconv launching so many threads?
    – Elder Geek
    Feb 8, 2016 at 18:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .