# Counting CPU threads



## ICPH (Sep 18, 2015)

Hello,

please how many threads this CPU has?

http://ark.intel.com/products/82932/Intel-Core-i7-5820K-Processor-15M-Cache-up-to-3_60-GHz

# of Cores6# of Threads12it has hyperthreading, does it mean it is 12 or 24?

-----------

If the CPU is Dual Xeon L5520

http://ark.intel.com/products/40201/Intel-Xeon-Processor-L5520-8M-Cache-2_26-GHz-5_86-GTs-Intel-QPI

# of Cores4# of Threads8I multiply it 2 times, so 16 threads, right?


----------



## rds100 (Sep 18, 2015)

> Hello,
> 
> please how many threads this CPU has?
> 
> ...



It's 6 cores. Each hyperthreading core has 2 threads, so it's 12 threads total. I think the description is pretty clear.


----------



## HostPuma (Sep 18, 2015)

Yes, you multiple by 2 because its DUAL Xeon L5520. So you will have 8 physical cores and a total of 16 threads.


----------



## Munzy (Sep 18, 2015)

OMG you are an idiot, and you run a company, sigh.

To answer your question. Where is says the number of threads is the number of threads on the cpu. If the cpu has hyperthreading they will list the number of threads supported by the cpu assuming hyperthreading is on.

Generally you have 1 thread per cpu.

If hyperthreading is enabled you have 2 threads per cpu.

Threads are not the same performance as the single cpu core.


----------



## RLT (Sep 18, 2015)

Munzy don't you mean per core not per cpu?

They way you say it the to example would have one core and two threads.


----------



## Munzy (Sep 18, 2015)

@RLT correct, I was meaning cpu core.


----------



## Geek (Sep 18, 2015)

Good practice would be to run lscpu on your existing nodes, then you should be able to calculate this in your head after a time or two...

Dual Octa Example:

[email protected]:~# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
*Thread(s) per core: 2
C*ore(s) per socket: 8
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz
CPU family: 6
Model: 62
Stepping: 4
CPU MHz: 2600.016
BogoMIPS: 5199.25
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache:  256K
L3 cache: 20480K
NUMA node0 CPU(s): 0-7,16-23
NUMA node1 CPU(s): 8-15,24-31


```
[SIZE=12px][FONT=arial]Dual Hex Example:[/FONT]
[/SIZE]
```


```
[SIZE=11px][email protected]:/var/log# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                24
On-line CPU(s) list:   0-23
[B]Thread(s) per core:    2
[/B]Core(s) per socket:    6
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 62
Stepping:              4
CPU MHz:               2099.668
BogoMIPS:              4199.93
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              15360K
NUMA node0 CPU(s):     0-5,12-17
NUMA node1 CPU(s):     6-11,18-23
[/SIZE]
```
The only example I have without HT (which will report 1 thread per core as @Munzy indicated) is a KVM I'm playing around with in QA, but here's the example nonetheless, using six of the cores.


```
[SIZE=11px]
[[email protected] ~]# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                6
On-line CPU(s) list:   0-5
[B]Thread(s) per core:    1
Core(s) per socket:    1
[/B]Socket(s):             6
NUMA node(s):          1
Vendor ID:             GenuineIntel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
CPU family:            6
Model:                 62
Stepping:              4
CPU MHz:               2100.000
BogoMIPS:              4200.00
Hypervisor vendor:     KVM
Virtualization type:   full
NUMA node0 CPU(s):     0-6[/SIZE]
```


----------

