About Hyperthreading and cpu load

about the number of logical CPU kernels, there is a formula

number of logical CPU = number of physical cpu x number of cores per physical cpu x 2 (if hyperthreading is supported and enabled)

that is, if hyperthreading is turned on, the number of logical CPU is twice as large as that of no hyperthreading.

get the cpu parameters of a machine as follows

number of logical CPU =
[root@redis-server parentManage]-sharp cat / proc/cpuinfo | grep "processor" | wc-l
12

number of cores per physical cpu
[root@redis-server parentManage]-sharp cat / proc/cpuinfo | grep "cpu cores" | uniq
cpu cores: 3

number of physical cpu
[root@redis-server parentManage]-sharp cat / proc/cpuinfo | grep "physical id" | sort | uniq | wc-l
2

it can be seen that this machine has a total of 6 cores, but because of hyperthreading, there are 12 logical cpu
. What I want to ask is, when this machine is a tomcat server, how can
determine if hyperthreading is used?
that is, when watching cpu load with top, is
cpu load with a maximum value of 6 or 12?

Jan.31,2022
Menu