Understanding Linux/proc/cpuinfo

Source: Internet
Author: User

Http://www.richweb.com/cpu_info

A hyperthreaded processor have the same number of function units as an older, non-hyperthreaded processor. It just has a execution contexts, so it can maybe achieve better function unit utilization by letting more than one prog Ram execute concurrently. On the other hand, if you ' re running-programs which compete for the same function units, there are no advantage at all To have both running "concurrently." When one was running, the other was necessarily waiting on the same function units.

A dual core processor literally has both times as many function units as a Single-core processor, and can really run-PR Ograms concurrently, with the no competition for function units.

A Dual Core processor is built so, both cores share the same level 2 cache. A Dual Processor (separate physical CPUs) system differs in this each CPU would have it own level 2 cache. This could sound like a advantage, and in some situations it can is but a many cases new and testing shows that T He shared cache can be faster when the CPUs is sharing the same or very similar tasks.

In general hyperthreading are considered older technology and are no longer supported in newer CPUs. HyperThreading can provide a marginal (10%) for some server workloads like MySQL, but dual core technology have essentially Replaced hyperthreading in newer systems.

A Dual core CPU running at 3.0Ghz should is faster then a dual CPUs (separate core) system running at 3.0Ghz due to the ABI Lity to share the cache at higher bus speeds.

The examples below details how do we determine what kind of CPU (s) is present.

The kernel data Linux exposes In/proc/cpuinfo would show each of the logical CPUs with a unique processor number. A logical CPU can be a hyperthreading sibling, a shared core in a dual or quad core, or a separate physical CPU. We must look at the siblings, CPU cores and core ID to tell the difference.

If the number of cores = the number of siblings for a given physical processor, then hyperthreading is OFF.

/bin/cat/proc/cpuinfo | /bin/egrep ' Processor|model name|cache size|core|sibling|physical '

Example 1:single processor, 1 core, no hyperthreading
Processor:0model NAME:AMD Duron (tm) Processorcache size:64 KB
Example 2:single processor, 1 core, hyperthreading is enabled.

Notice how we had 2 siblings, but only 1 core. The physical CPU ID is the same for both:0.

Processor:0model Name:intel (R) Pentium (r) 4 CPU 2.80GHzcache size:1024 kbphysical id:0siblings:2core id:0cpu cores:  1processor:1model Name:intel (R) Pentium (r) 4 CPU 2.80GHzcache size:1024 kbphysical id:0siblings:2core id:0cpu cores: 1
Example 3. Single Socket Quad Core

Notice how each processor have its own core ID. The number of siblings matches the number of cores so there is no hyperthreading siblings. Also Notice the huge L2 cache-6 MB. That's makes sense though, when considering 4 cores share the L2 cache.

Processor:0model Name:intel (R) Xeon (r) CPU           E5410  @ 2.33GHzcache size:6144 kbphysical id:0siblings:4core id:0  CPU Cores:4processor:1model Name:intel (R) Xeon (r) CPU           E5410  @ 2.33GHzcache size:6144 kbphysical id:0siblings: 4core id:1cpu Cores:4processor:2model Name:intel (R) Xeon (r) CPU           E5410  @ 2.33GHzcache size:6144 kbphysical ID : 0siblings:4core id:2cpu Cores:4processor:3model Name:intel (R) Xeon (r) CPU           E5410  @ 2.33GHzcache size:6144 K Bphysical Id:0siblings:4core id:3cpu cores:4
Example 3a. Single Socket Dual Core

Again, each processor have its own core so the is a dual core system.

Processor:0model Name:intel (R) Pentium (r) D CPU 3.00GHzcache size:2048 kbphysical id:0siblings:2core id:0cpu cores:  2processor:1model Name:intel (R) Pentium (r) D CPU 3.00GHzcache size:2048 kbphysical id:0siblings:2core id:1cpu cores: 2
Example 4. Dual single Core CPU, hyperthreading ENABLED

This example shows that Processer 0 and 2 share the same physical CPU and 1 and 3 share the same physical CPU. The number of siblings is twice the number of cores, which are another clue, this is a system with hyperthreading enabl Ed.

Processor:0model Name:intel (R) Xeon (TM) CPU 3.60GHzcache size:1024 kbphysical id:0siblings:2core id:0cpu Cores:1pro Cessor:1model Name:intel (R) Xeon (TM) CPU 3.60GHzcache size:1024 kbphysical id:3siblings:2core id:0cpu cores:1proces Sor:2model Name:intel (R) Xeon (TM) CPU 3.60GHzcache size:1024 kbphysical id:0siblings:2core id:0cpu cores:1processor : 3model Name:intel (R) Xeon (TM) CPU 3.60GHzcache size:1024 kbphysical id:3siblings:2core id:0cpu cores:1
Example 5. Dual CPU Dual Core No hyperthreading

Of the 5 examples this should is the most capable system processor-wise. There is a total of 4 cores; 2 cores in 2 separate socketed physical CPUs. Each core shares the 4MB cache with its sibling core. The higher clock rate (3.0 Ghz vs 2.3Ghz) should offer slightly better performance than example 3.

Processor:0model Name:intel (R) Xeon (r) CPU            5160  @ 3.00GHzcache size:4096 kbphysical id:0siblings:2core id:0c Pu Cores:2processor:1model Name:intel (R) Xeon (r) CPU            5160  @ 3.00GHzcache size:4096 kbphysical id:0siblings:2 Core ID:1CPU Cores:2processor:2model Name:intel (R) Xeon (r) CPU            5160  @ 3.00GHzcache size:4096 kbphysical id:3 Siblings:2core id:0cpu Cores:2processor:3model Name:intel (R) Xeon (r) CPU            5160  @ 3.00GHzcache size:4096 kbphy Sical Id:3siblings:2core id:1cpu Cores:2

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.