(i) Conceptual
① Physical CPU
Number of CPUs on slots in actual server
Number of physical CPUs, several physical IDs can be counted
② Logical CPU
/proc/cpuinfo used to store CPU hardware information.
The information content lists the specification of processor 0–processor N respectively. Note here that n is the logical number of CPUs
In general, we think that a CPU can have multi-core, plus Intel's Hyper-Threading Technology (HT), which can logically be divided into a second number of CPU core out
Logical CPUs = number of physical CPUs x CPU cores This metric value x 2 (if HT is supported and turned on)
Note: Linux top view CPU is also the number of logical CPUs
③CPU Nuclear number
The number of chipsets that can process data on a single CPU, such as the current i5 760, is a dual-core four-thread CPU, and i5 2250 is a quad-core four-threaded CPU
In general, the number of physical CPUs x per kernel should equal the number of logical CPUs, if not equal, the server's CPU support Hyper-Threading Technology
㈡ View CPU Information
When we cat/proc/cpuinfo,
CPUs with the same core ID are the same core Hyper-threading
CPUs with the same physical ID are threads or cores encapsulated by the same CPU
Example
# Total Kernel = number of physical CPUs X number of cores per physical CPU
# Total Logical CPUs = number of physical CPUs x number of cores per physical CPU x Hyper-Threading
# View the number of physical CPUs
cat/proc/cpuinfo| grep "Physical ID" | Sort| uniq| Wc-l
# View the number of cores in each physical CPU (that is, the kernel number)
cat/proc/cpuinfo| grep "CPU Cores" | Uniq
# View the number of logical CPUs
cat/proc/cpuinfo| grep "Processor" | Wc-l
#查看CPU信息 (model)
Cat/proc/cpuinfo | grep name | Cut-f2-d: | Uniq-c