Subscribe to Posts by Email

Subscriber Count

    696

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

Unix: CPU Counts explained

Hello,

A multi-core processor is a single computing component with two or more independent actual central processing units (called "cores"), which are the units that read and execute program instructions.[1] The instructions are ordinary CPU instructions such as add, move data, and branch, but the multiple cores can run multiple instructions at the same time, increasing overall speed for programs amenable to parallel computing.

A dual-core processor has two cores (e.g. AMD Phenom II X2, Intel Core Duo), a quad-core processor contains four cores (e.g. AMD Phenom II X4, Intel's quad-core processors, see i3, i5, and i7 at Intel Core), a hexa-core processor contains six cores (e.g. AMD Phenom II X6, Intel Core i7 Extreme Edition 980X), an octa-core processor contains eight cores (e.g. Intel Xeon E7-2820, AMD FX-8150). A multi-core processor implements multiprocessing in a single physical package. Designers may couple cores in a multi-core device tightly or loosely. For example, cores may or may not share caches, and they may implement message passing or shared memory inter-core communication methods

A diagram that depicts the CPU and its cores for a dual core processor.

CPU_Arch

Now, For example how to find the Physical CPU, Cores, Virtual CPU's in a Linux

Find the Physical CPU's

[oracle@XXXXXXXXXX]/home/oracle # cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
8

Find the Cores per each CPU

[oracle@XXXXXXXXXX]/home/oracle # cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores : 4

Find the number of virtual processor in total in Server

[oracle@XXXXXXXXXX]//home/oracle # cat /proc/cpuinfo | grep "^processor"
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
processor : 6
processor : 7
processor : 8
processor : 9
processor : 10
processor : 11
processor : 12
processor : 13
processor : 14
processor : 15
processor : 16
processor : 17
processor : 18
processor : 19
processor : 20
processor : 21
processor : 22
processor : 23
processor : 24
processor : 25
processor : 26
processor : 27
processor : 28
processor : 29
processor : 30
processor : 31

Identify the model of your processor, i.e quad core, dual core etc.

[oracle@XXXXXXXXX]/home/oracle # cat /proc/cpuinfo | grep model
model : 4
model name : Quad-Core AMD Opteron(tm) Processor 8384

I have a quad core processor, So my server has

8 (physical CPU) * 4 core each per CPU = 32 vCPU.

This 32 cpu will show in your cpu_count

SQL> show parameter cpu_count

NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
cpu_count integer 32

SQL>

In Solaris the above can be gathered a bit different way, Download Solaris_CPUCount">Script Here
Output

Total number of physical processors: 4
Number of virtual processors: 32
Total number of cores: 16
Number of cores per physical processor: 4
Number of hardware threads (strands or vCPUs) per core: 2
Processor speed: 2660 MHz (2.66 GHz)

** Socket-Core-vCPU mapping **

Physical Processor 1 (chip id: 1024):
Core 1 (core id: 0):
vCPU ids: 0 - 1
Core 2 (core id: 2):
vCPU ids: 2 - 3
Core 3 (core id: 4):
vCPU ids: 4 - 5
Core 4 (core id: 6):
vCPU ids: 6 - 7

Physical Processor 2 (chip id: 1032):
Core 1 (core id: 8):
vCPU ids: 8 - 9
Core 2 (core id: 10):
vCPU ids: 10 - 11
Core 3 (core id: 12):
vCPU ids: 12 - 13
Core 4 (core id: 14):
vCPU ids: 14 - 15

Physical Processor 3 (chip id: 1040):
Core 1 (core id: 16):
vCPU ids: 16 - 17
Core 2 (core id: 18):
vCPU ids: 18 - 19
Core 3 (core id: 20):
vCPU ids: 20 - 21
Core 4 (core id: 22):
vCPU ids: 22 - 23

Physical Processor 4 (chip id: 1048):
Core 1 (core id: 24):
vCPU ids: 24 - 25
Core 2 (core id: 26):
vCPU ids: 26 - 27
Core 3 (core id: 28):
vCPU ids: 28 - 29
Core 4 (core id: 30):
vCPU ids: 30 - 31

-Thanks
Geek DBA

Comments are closed.