[TynesideLUG] Casey - Number of cores in a system.

Ian Bruntlett ian.bruntlett at gmail.com
Fri Apr 24 12:29:49 UTC 2020


Hi Casey,

Yes, htop (and other applications) can be confused into thinking a single
core with hyperthreading is two cores.

For illustration purposes, I'm looking up info for the processor in my
computer.

If you dig deeper, with the lscpu command, you get info like this:-
~$ lscpu
Architecture:        x86_64
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
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               42
Model name:          Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz
Stepping:            7
CPU MHz:             2492.980
CPU max MHz:         3200.0000
CPU min MHz:         800.0000
BogoMIPS:            4983.79
Virtualisation:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            3072K
NUMA node0 CPU(s):   0-3
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 syscall
nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology nonstop_tsc
cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3
cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes
xsave avx lahf_lm epb pti ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority
ept vpid
xsaveopt dtherm ida arat pln pts md_clear flush_l1d

I also Googled for "i5-2520M" and the second result was from the
ark.intel.com site and under performance it listed:-

Performance
    # of Cores 2
    # of Threads 4
    Processor Base Frequency 2.50 GHz
    Max Turbo Frequency 3.20 GHz
    Cache 3 MB IntelĀ® Smart Cache
    Bus Speed 5 GT/s
    TDP

And for CPU benchmarks (note: benchmarks should be taken with a pinch of
salt), I go to https://www.cpubenchmark.net/CPU_mega_page.html

HTH,


Ian

-- 
-- ACCU - Professionalism in programming - http://www.accu.org
-- My writing - https://sites.google.com/site/ianbruntlett/
-- Free Software page -
https://sites.google.com/site/ianbruntlett/home/free-software


More information about the Tyneside mailing list