Basis of judgment:A physically encapsulated CPU (judged by physical ID) can have multiple cores (differentiated by Core ID).Each core can have multiple logical CPUs (judged by processor).One core implements this core's own hyper-Threading technology
In Linux, you can view the number of physical CPUs, cores, logical CPUs, and linux. In Linux, when you view the number of physical CPUs, cores, and logical CPUs, we recommend that you enable the number of worker processes to 1 to 4 times the number
information in the Cat/proc/cpuinfoprocessor The ID of the logical processor. ID of the processor that physical ID physically encapsulates. the ID of the core ID for each key. CPU Cores The number of cores in the same physically encapsulated
(i) Conceptual
① Physical CPU
Number of CPUs on slots in actual serverNumber 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
The number of Linux CPUs is judged by/proc/cpuinfo.Same Physical ID: determines a physical processorIf "siblings" and "CPU cores" are consistent, hyper-threading is not supported, or hyper-threading is not open.If "siblings" is twice Times "CPU
Check the number of physical CPUs, cores, logical CPUs, and linuxcpu in linux.
I. First, we need to clarify the concept of the number of physical CPUs, the number of cores, and the number of logical CPUs.
1. Number of physical CPUs: the number of
# total number of cores =Number of physical CPUs × number of cores per physical CPU # Total Logical CPUs=Number of physical CPUs x number of cores per physical CPU X number of hyper-threads # View the number of physical CPUsCat/proc/cpuinfo|grep
Linux displays the number of physical CPUs, cores, logical CPUs, and linux
# Total number of cores = number of physical CPUs X number of cores per physical CPU # Total number of logical CPUs = number of physical CPUs X number of cores per physical
(i) Concept① Physical CPUNumber of CPUs on the actual server slotsNumber of physical CPUs, number of physical IDs that can be repeated② Logical CPU/proc/cpuinfo used to store CPU hardware information.The information content lists the specifications
First, look at what the Hyper-threading conceptHyper-Threading technology is the use of special hardware instructions, the two logical core simulation into two physical chips, so that a single processor can use thread-level parallel computing, and
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.