physical cores - linux

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

physical cores - linux

satish
Dear Erman,

How could we identify the physical cores in a system when there are 2 sockets.When going to buy oracle licences,they have updates us to give the number of cores

Below shows 24

/u01/PROD/inst/apps/SSSEBSPR_ssstindcpodb02/logs/appl/conc/log > getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null || echo 1
24

Below shows 6

/u01/PROD/inst/apps/SSSEBSPR_ssstindcpodb02/logs/appl/conc/log > grep '^core id' /proc/cpuinfo |sort -u|wc -l
6


What command will give us the number of cores when we have multiprocessor and more than 1 socket?

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: physical cores - linux

ErmanArslansOracleBlog
Administrator
Check /proc/cpuinfo

physical id there is the cpu.
core id there is the core.

you can derive the core count by checking the entries, which have the same physical id but different core id.
Check the distinct ones.. I mean if you have HT enabled, then you may see similar outputs for the same cores. So only take the distinct entries into consideration.

For example:

If you have only these entries below; it means you have 1 dual core cpu and that's it.

processor   : 0
physical id : 0
core id : 0

processor   : 1
physical id : 0
core id : 1
Reply | Threaded
Open this post in threaded view
|

Re: physical cores - linux

satish
Thanks erman.

We have quad core cpu

[oraprod@node1 ~]$ cat /proc/cpuinfo|grep -i 'core id'|sort|uniq
core id         : 0
core id         : 1
core id         : 2
core id         : 3

[oraprod@node1~]$ cat /proc/cpuinfo|grep -i 'physical id'|sort|uniq
physical id     : 0


In general,manual says load average or say run queue(r column in vmstat) should not exceed the number of cores consistently.In this case,if i have quad core cpu with HTT enabled,what will be the number of cores to consider...is it 4 or 8

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: physical cores - linux

ErmanArslansOracleBlog
Administrator
Yes.
4 is the critical load for you.
After 4 , your processes "may" start to slow down little by little, because they will be queued.
Reply | Threaded
Open this post in threaded view
|

Re: physical cores - linux

ErmanArslansOracleBlog
Administrator
This post was updated on .
Oh sorry.
You have a 4 core cpu with HT enabled, then that number is 8 for you..
Reply | Threaded
Open this post in threaded view
|

Re: physical cores - linux

ErmanArslansOracleBlog
Administrator
Still try to keep it at 7.. just in case.. Cause Hyperthreading is a method rather than a real processor or core , so it is good to keep a buffer for it.
Sri
Reply | Threaded
Open this post in threaded view
|

Re: physical cores - linux

Sri
Thanks for the update erman.

This is where my confusion lies. Is it 4 or 7?

As per your previous update,we should consider 7.pls correct me if i am wrong

Thank you
Sri
Reply | Threaded
Open this post in threaded view
|

Re: physical cores - linux

Sri
Missed your previous update...thanks for the clarification.This Information is useful to many of us