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, 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.
 

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.