LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-09-2015, 03:07 AM   #1
bangnagr
Member
 
Registered: Jan 2013
Posts: 48

Rep: Reputation: 4
How many CPUs I have ?


Hi all

This para is from book - 'Troubleshooting Linux Server Best Practices', describing load average in uptime command.

"A single-CPU system with a load average of 1 means the single CPU is under constant load. If that single-CPU system has a load average of 4, there is four times the load on the system than it can handle, so three out of four processes are waiting for resources. The load average reported on a system is not tweaked based on the number of CPUs you have, so if you have a two-CPU system with a load average of 1, one of your two CPUs is loaded at all times that is, you are 50% loaded. So a load of 1 on a single-CPU system is the same as a load of 4 on a four-CPU system in terms of the amount of available resources used."

In this, when he says 1 CPU, is he referring to a physical CPU or Cores ?

I'm confused, in my system I have 1 physical CPU (Intel Core2Duo E7500) with 2 cores. A load of 1 in my system is 100% or 50% ? I have also seen servers with 2 physical CPUs (or processors )

My system output:
Code:
# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 23
Model name:            Intel(R) Core(TM)2 Duo CPU     E7500  @ 2.93GHz
Stepping:              10
CPU MHz:               1600.000
CPU max MHz:           2933.0000
CPU min MHz:           1600.0000
BogoMIPS:              5866.29
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              3072K
NUMA node0 CPU(s):     0,1

# nproc
2
Is single core considered as one CPU ?

Thank you
 
Old 07-09-2015, 04:10 AM   #2
Vernicronz
Member
 
Registered: Jul 2014
Distribution: Redhat & Centos
Posts: 31

Rep: Reputation: Disabled
Hi ,

this article will help you better

http://www.howtogeek.com/194756/cpu-...ing-explained/
 
1 members found this post helpful.
Old 07-09-2015, 04:13 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,054

Rep: Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915Reputation: 1915
Quote:
Originally Posted by bangnagr View Post
Code:
CPU(s):                2
When in doubt believe what the kernel is telling you.
Quote:
Is single core considered as one CPU ?
Yes.

The author of that article is wrong about how loadavg should be interpreted - this is a common fallacy on the web also. In Linux, the loadavg includes tasks in uniterruptible sleep - usually waiting on disk I/O. This can cause the loadavg to increase without having any demand or effect on CPU usage.
 
2 members found this post helpful.
Old 07-09-2015, 08:22 AM   #4
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,484
Blog Entries: 10

Rep: Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643Reputation: 1643
They're referring to cores and they wrote about that topic in a very confusing manner. They'd have been better off just copying from the uptime manual page instead of wherever they got that or rewrote it.
 
Old 07-11-2015, 08:15 AM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Quote:
Originally Posted by bangnagr View Post
Hi all

Is single core considered as one CPU ?

Thank you
The definition of a CPU (Central Processing Unit) is that part of the hardware that incorporates the instruction cycle, which carries out the processing part.

The fact that vendors started mixing "cpu" for their product containing multiple cpus is a marketing issue. The technical definition of CPU hasn't changed.

Each core is a CPU.
 
1 members found this post helpful.
Old 07-13-2015, 07:03 PM   #6
Chad-Bayne
LQ Newbie
 
Registered: Jul 2015
Posts: 4

Rep: Reputation: Disabled
@ bangnagr

Code:
egrep -i "cores|siblings" /proc/cpuinfo
This should give you the number of physical cores and virtual threads.

If the siblings equal the number of cpu cores, than hyper threading is disabled in the BIOS or is not available for the CPU.

Here is an example of mine.

siblings : 4
cpu cores : 2
siblings : 4
cpu cores : 2
siblings : 4
cpu cores : 2
siblings : 4
cpu cores : 2

On my system, I have two physical cores with 4 siblings. So this means that hyperthreading is enabled and my system acts like a quad core.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] 2 CPUs but should be 1? grovep Linux - Newbie 6 11-15-2012 09:12 AM
CPUs totallynewguy Linux - Hardware 3 08-29-2005 11:06 PM
Via CPUs 3dmike Linux - Hardware 2 03-22-2004 01:39 PM
2 CPUs jhirshon Linux - Newbie 2 01-31-2004 06:59 PM
What CPUs does everyone use? Guru3 Linux - Hardware 43 01-22-2004 11:15 AM


All times are GMT -5. The time now is 01:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration