Linux view machine CPU core number

CPUTotal core = physical CPU number * the number of cores per physical CPU.
Total logical CPU = physical CPU number * the number of cores per physical CPU * the number of super threads.

Copy code ></span></div>
<pre>View CPU information (model)[root@AAA ~] cat /proc/cpuinfo grep name cut cut -f2 -d: uniq -c24 InteL (R) Xeon (R) CPU E5-2630 0 @ 2.30GHzLook at the number of physical CPU[root@AAA ~] cat /proc/cpuinfo| grep
Copy code ></span></div>
</div>
<p> </p>
<p>Let’s look at what CPU stands for.</p>
<p>Many physical CPU, CPU communicate through the bus, the efficiency is relatively low, as follows:</p>
<p><img src=

Multi-core CPU, different cores communicate through L2 cache, storage and peripherals communicate with CPU via bus, as follows:

Multi-core hyperthreading, each core has two logical processing units, two cores share a core of resources, as follows:

From what I’ve done above, it turns out that I’m using a CPU with 2 * 6 = 12 cores, each with two hyperthreads, so I have 24 logical CPUs.

Leave a Reply

Your email address will not be published. Required fields are marked *