Number of physical CPU, logical CPU, and CPU cores in Linux
Source: Internet
Author: User
Linux distinguishes physical CPU, logical CPU, and CPU cores (I) concept www.2cto.com ① physical CPU the number of physical CPUs in the actual Server slot the number of physical CPUs, the number of non-repeated physical... information & nbsp; | & nbsp; number of physical CPUs, logical CPUs, and CPU cores in Linux (I) concept www.2cto.com ① number of physical CPUs in the actual Server slot physical CPUs, there are several non-repeated physical IDs. ② logical CPU Linux users are certainly familiar with the/proc/cpuinfo file. it lists the specifications of processor 0-n separately. It should be noted that if you think n is the actual number of CPUs, it would be a big mistake. we think a cpu can have multiple cores, coupled with intel's Hyper-Threading Technology (HT ), logically, you can double the number of cpu cores. logical CPU count = physical cpu count x cpu cores. the specification value is x 2 (if ht is supported and enabled) www.2cto.com. Note the following: in Linux, the top view CPU is also the number of logical CPUs ③ number of CPU cores the number of chipsets on which data can be processed by one CPU, such as the current i5 760, it is a dual-core CPU with four threads, while i5 2250 is a four-core CPU with four threads. Generally, the number of physical CPUs × the number of each core should be equal to the number of logical CPUs. otherwise, indicates that the CPU of the server supports Hyper-Threading Technology (II) view CPU information. when we use cat/proc/cpuinfo, the CPU with the same core id is the same CPU with the same physical id. threads or cores encapsulated by the same CPU (III) example 1 view the number of physical CPUs [plain] # cat/proc/cpuinfo | grep "physical id" | sort | uniq | wc- l 2 ② view the number of logical CPUs [plain] # cat/proc/cpuinfo | grep "processor" | wc-l 24 ③ view CPU cores [plain] # cat/proc /cpuinfo | grep "cores" | uniq 6 I should have 2 CPUs here, each Cpu has 6 cores, which should be Intel's U and support hyper-threading.
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.