"Linux command" Lscpu,, Etc/cpuinfo detailed

Source: Internet
Author: User

12345678910111213141516171819202122 i2000:~ # lscpuArchitecture:          x86_64CPU op-mode(s):        32-bit, 64-bitByte Order:            Little EndianCPU(s):                8On-line CPU(s) list:   0-7Thread(s) per core:    2Core(s) per socket:    1Socket(s):             4NUMA node(s):          1Vendor ID:             GenuineIntelCPU family:            6Model:                 62Stepping:              4CPU MHz:               2499.998BogoMIPS:              4999.99Hypervisor vendor:     KVMVirtualization type:   fullL1d cache:             32KL1i cache:             32KL2 cache:              4096KNUMA node0 CPU(s):     0-7

  

The socket is the number of slots on the motherboard that are plugged into the CPU, which is the number of physical CPUs that can be plugged in.

Core is what we usually call "nuclear", each physical CPU can be dual-core, quad-core and so on.

Thread is the number of hardware threads per core, that is, Hyper-threading

Enter the command cat/proc/cpuinfo view physical ID There are several, the above results show only 0, so there is only one physical CPU; There are several processor, the above results show 0 and 12, so there are two logical CPUs.

(i) Concept
① Physical CPU
Number of CPUs on the actual server slots
Number 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 of processor 0–processor N, respectively. It is important to note that N is the number of logical CPUs
In general, we think that a CPU can have multicore, plus Intel's Hyper-Threading Technology (HT), can logically divide the number of CPU core out
Number of logical CPUs = number of physical CPUs x CPU cores This specification value x 2 (if HT is supported and turned on)
Note: Linux top view CPU is also the number of logical CPUs
③CPU Number of cores
The number of chipsets that can process data on a CPU, such as the current i5 760, is a dual-core four-thread CPU, while i5 2250 is a quad-core four-thread CPU
In general, the number of physical CPUs x per core should be equal to the number of logical CPUs, if not equal, it means that the server's CPU support Hyper-Threading Technology
㈡ Viewing CPU information
When we are Cat/proc/cpuinfo,
CPUs with the same core ID are Hyper-threading of the same core
CPUs with the same physical ID are the same CPU-encapsulated thread or core
㈢ The following examples illustrate
① View the number of physical CPUs
#cat/proc/cpuinfo |grep "Physical id" |sort |uniq|wc-l
2
② View the number of logical CPUs
#cat/proc/cpuinfo |grep "Processor" |wc-l
24
③ View CPU is a few cores
#cat/proc/cpuinfo |grep "Cores" |uniq
6

"Linux command" Lscpu,, Etc/cpuinfo detailed

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.