Manikantapt
asked on
Load Average
HI ,
I am not able to figure out what is the good load average (which is not an alaram) for my data base server.
Can you please help me to find out it.
lscpu gives me this
oracle@db1:~> lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
CPU socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 47
Stepping: 2
CPU MHz: 1064.000
BogoMIPS: 3995.67
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 18432K
NUMA node0 CPU(s): 0-7,16-23
NUMA node1 CPU(s): 8-15,24-31
and cat /proc/cpuinfo I will attach
Based on this Link http://www.golinuxhub.com/2014/06/understanding-load-average-in-linux-and.html
less /proc/cpuinfo | grep "physical id" | sort|uniq | wc -l gives me 2
and less /proc/cpuinfo | grep "core id" | sort|uniq | wc -l gives me 8
so I calculated 2*8 =16 is 100% load and any thing above this is alaram.
Also could you please tell me what is from cpu info
physical id : 0
siblings : 16
core id : 0
cpu cores : 8
how it is architected ? Also what is processor,cores and cpu ? also how hyperthreading is acrhitected . How does it help us ?
My manager says if your system is 32 processor one and cores are 8 then it It is a machine of 32*8=256 cores
So you will have 256 processors and load average < 256 is perfectly fine.
I am not able to figure out what is the good load average (which is not an alaram) for my data base server.
Can you please help me to find out it.
lscpu gives me this
oracle@db1:~> lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
CPU socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 47
Stepping: 2
CPU MHz: 1064.000
BogoMIPS: 3995.67
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 18432K
NUMA node0 CPU(s): 0-7,16-23
NUMA node1 CPU(s): 8-15,24-31
and cat /proc/cpuinfo I will attach
Based on this Link http://www.golinuxhub.com/2014/06/understanding-load-average-in-linux-and.html
less /proc/cpuinfo | grep "physical id" | sort|uniq | wc -l gives me 2
and less /proc/cpuinfo | grep "core id" | sort|uniq | wc -l gives me 8
so I calculated 2*8 =16 is 100% load and any thing above this is alaram.
Also could you please tell me what is from cpu info
physical id : 0
siblings : 16
core id : 0
cpu cores : 8
how it is architected ? Also what is processor,cores and cpu ? also how hyperthreading is acrhitected . How does it help us ?
My manager says if your system is 32 processor one and cores are 8 then it It is a machine of 32*8=256 cores
So you will have 256 processors and load average < 256 is perfectly fine.
@ozo: Actually you did not answer the question! Did you even read it?!
And btw: what good is a uptime and/or top/atop/htop command, if you do not know how to "read" the values properly (in conjunction to your sys setup)??!!
I am not able to figure out what is the good load average (which is not an alaram) for my data base server.
And btw: what good is a uptime and/or top/atop/htop command, if you do not know how to "read" the values properly (in conjunction to your sys setup)??!!
ASKER
Sorry Some issue with Internet Could not see when you commented.
I can see the uptime ,top etc and understand it . First value is current ,second is 5 min before and third value is 15 min before.
My question is how do I say my system is underload,overloaded by seeing loadaverage .I came to know that loadaverage values depends on no of cpu,core etc That part I didn't understand.
I can see the uptime ,top etc and understand it . First value is current ,second is 5 min before and third value is 15 min before.
My question is how do I say my system is underload,overloaded by seeing loadaverage .I came to know that loadaverage values depends on no of cpu,core etc That part I didn't understand.
I think "The traffic analogy" as shown and described here is THE explanation you seek:
http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
I had similar problems in understanding how this works out, but this one's quite good, I think...
http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages
I had similar problems in understanding how this works out, but this one's quite good, I think...
[...]A single-core CPU is like a single lane of traffic. Imagine you are a bridge operator ... sometimes your bridge is so busy there are cars lined up to cross. You want to let folks know how traffic is moving on your bridge. A decent metric would be how many cars are waiting at a particular time. If no cars are waiting, incoming drivers know they can drive across right away. If cars are backed up, drivers know they're in for delays.[...]
ASKER
Thank you Alex,
But main problem here is to identify no of cores.
When I list it shows processor no 0- 31 and each list shows core= 8 . Each processor has 8 core or the listed processor is one of the 8 core ?
processor : 26
vendor_id : GenuineIntel
cpu family : 6
model : 47
model name : Intel(R) Xeon(R) CPU E7- 4820 @ 2.00GHz
stepping : 2
cpu MHz : 1064.000
cache size : 18432 KB
physical id : 2
siblings : 16
core id : 2
cpu cores : 8
Can you please explain me this names and their values ?
But main problem here is to identify no of cores.
When I list it shows processor no 0- 31 and each list shows core= 8 . Each processor has 8 core or the listed processor is one of the 8 core ?
processor : 26
vendor_id : GenuineIntel
cpu family : 6
model : 47
model name : Intel(R) Xeon(R) CPU E7- 4820 @ 2.00GHz
stepping : 2
cpu MHz : 1064.000
cache size : 18432 KB
physical id : 2
siblings : 16
core id : 2
cpu cores : 8
Can you please explain me this names and their values ?
Sometimes I use this little script:
About /proc/cpuinfo:
http://www.brandonhutchinson.com/Understanding_proc_cpuinfo.html
http://www.binarytides.com/linux-cpu-information/
http://superuser.com/questions/388115/interpreting-output-of-cat-proc-cpuinfo
https://www.ibm.com/developerworks/community/blogs/brian/entry/linux_show_the_number_of_cpu_cores_on_your_system17?lang=en
#!/bin/bash
#
#
val1=`grep "cpu cores" /proc/cpuinfo |sort -u |cut -d":" -f2`
val2=`grep -c "processor" /proc/cpuinfo`
val3=`uptime | awk -F'load average:' '{ print $2 }' | cut -d"," -f1`
load=`echo "scale=3; $val3 / ($val1 * $val2)" | bc | sed 's/^\./0./'`
fname=top_$(date +"%Y%m%d").log
echo `date +"%d.%m.%Y %T"`";"$load >> $fname
unset val1 val2 val3 load fname
About /proc/cpuinfo:
http://www.brandonhutchinson.com/Understanding_proc_cpuinfo.html
http://www.binarytides.com/linux-cpu-information/
http://superuser.com/questions/388115/interpreting-output-of-cat-proc-cpuinfo
https://www.ibm.com/developerworks/community/blogs/brian/entry/linux_show_the_number_of_cpu_cores_on_your_system17?lang=en
ASKER
Thank you Alex,
Most of the links I have already read. Can please check the attachment and say how many processor are there . Is it 256 or 16 ?
Most of the links I have already read. Can please check the attachment and say how many processor are there . Is it 256 or 16 ?
Sorry, but there is no attachment like " /proc/cpuinfo" ?!
In general you have to multiply the number of (physical) CPUs by the number of cores per CPU...
In general you have to multiply the number of (physical) CPUs by the number of cores per CPU...
ASKER
Thanks a lot Alex for your timely response.
So Physical id is the processor id which has cores .
That makes my point correct . Physical ids are 0 and 2 . and cores are 8 .
The file name is cpuinfo.log . I guess I didn't click on "Upload File" button after selecting the file .I have reattached for your reference
cpuinfo.log
So Physical id is the processor id which has cores .
That makes my point correct . Physical ids are 0 and 2 . and cores are 8 .
The file name is cpuinfo.log . I guess I didn't click on "Upload File" button after selecting the file .I have reattached for your reference
cpuinfo.log
The total number of cores (which come into play when dealing with system load) would be:
echo $(grep "cpu cores" cpuinfo.log |sort -u |cut -d":" -f2) "*" $(grep -c "processor" cpuinfo.log) |
bc
= 256
ASKER
Hi Alex,
Thanks for the reply
In that case
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
CPU socket(s): 2
CPU(s): 32 -- what does this mean ?
Does it mean we have 2 cpus and each is 8 core and there is hyper-threading and then there is 8 cores within cores ?
I am really Sorry to say I cant agree with you . In fact you are not answering my question . You are putting some logic with numbers are deriving 256 .
Any one is there who is from H/W background and seen the mutlicore machine architecture and explain this to me .
Thanks for the reply
In that case
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
CPU socket(s): 2
CPU(s): 32 -- what does this mean ?
Does it mean we have 2 cpus and each is 8 core and there is hyper-threading and then there is 8 cores within cores ?
I am really Sorry to say I cant agree with you . In fact you are not answering my question . You are putting some logic with numbers are deriving 256 .
Any one is there who is from H/W background and seen the mutlicore machine architecture and explain this to me .
ASKER
The above list is from lscpu command which I put in the question itself
Actually there is a difference between physical cores and logical cores, as described here:
http://unix.stackexchange.com/questions/88283/so-what-are-logical-cpu-cores-as-opposed-to-physical-cpu-cores
http://unix.stackexchange.com/questions/88283/so-what-are-logical-cpu-cores-as-opposed-to-physical-cpu-cores
These threads are the core's logical capabilities.
Does it mean we have 2 cpus and each is 8 core and there is hyper-threading and then there is 8 cores within cores ?No! You have 2 sockets, that is NOT the number of CPUs on your system!
Add-on: the calculation for the total of processing units may vary, depending on whether you're running a system with multiple processors and/or hyper threading enabled. Please read the following (great) explanation:
http://www.binarytides.com/linux-check-processor/
Excerpt:
http://www.binarytides.com/linux-check-processor/
Excerpt:
[...]The 'cpu cores' = 4 and siblings = 8 which means there are 4 cores and 2 hyperthreads per core. Number of processors as shown by /proc/cpuinfo would also be 8.[...]
ASKER
I understood from it that link logical cores are the one which is displayed by lscpu = 32
and physical cores are 32/2 =16. since htt is enabled
Now from where did that 256 came ?
and physical cores are 32/2 =16. since htt is enabled
Now from where did that 256 came ?
that was just number of CPUs times number of cores per CPU (w/o taking HT into consideration...
CPUs: 32
cores/CPU: 8
32 * 8 = 256
CPUs: 32
cores/CPU: 8
32 * 8 = 256
ASKER
Alex, I have read so many links like that . I need answer from experts . Thats why I registered here and asking for experts answer. I have given the necessary data . Is there any more thing you need from me just ask. I want the right answer from the experts
ASKER
CPUs: 32
cores/CPU: 8 -------- where does it says 8 cores for CPU ?
32 * 8 = 256
it is says cores per socket right ?
cores/CPU: 8 -------- where does it says 8 cores for CPU ?
32 * 8 = 256
it is says cores per socket right ?
In your attached cpuinfo it says "cpu cores : 8", plus in comment https://www.experts-exchange.com/questions/28695598/Load-Average.html?anchorAnswerId=40872693#a40872693 you've mentioned that, too.
btw: I'm / we're trying to help you WITHOUT getting anything out of it @all (besides fame & glory), so there is absolutely no reason for you to get kind of rude!
btw: I'm / we're trying to help you WITHOUT getting anything out of it @all (besides fame & glory), so there is absolutely no reason for you to get kind of rude!
Multicore is just what it's called when they bascially cram multiple CPUs into a single chip rather than have them separated physically into separate sockets. The are individual CPUs but the do share L1 cache RAM. They've resorted to this to keep the CPUs cooler and maintain Moore's law a little longer. They can no longer make a single larger, faster monolithic CPU to improve speeds. That method reached its limit about 8 years ago.
Load average is a ball park figure. It's not that definitive. Hyperthreading muddles the issue even more.
From your original question.
Each socketed CPU has a specified number of cores. With hyperthreading, each core can handle 2 processes, partially. They basically pipeline commands and hope the results of the 1st command sequence allow for the 2nd command stream to utilized on the same data. If the 1st command determines that the 2nd stream shouldn't run, then that computation is thrown out and you don't benefit from that calculation.
oracle@db1:~> lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
CPU socket(s): 2
.
.
.
If you turn off hyperthreading, then you will have 1 thread per core and things become very simple.
1*8*2 = 16
Your maximum load average should be around 16. You can typically run 20% higher than your total number of physical cores and still be functional, but you will notice your system running slower. When you hit a load average of 50% above your physical CPUs, expect your system to slow to a crawl and become unresponsive.
Load average is a ballpark number.
In your original question, lscpu shows 32 CPUs.
That was derived by multiplying
Threads per core * Cores per socket * CPU sockets
2*8*2 = 32
Hyperthreading does not actually give you that much extra load handling. Plan for an extra 20%-40% before you expect things to slow down, because the extra stream of commands can get thrown out. So you should be ok with load averages of 19-22 when you have hyperthreading turned on. It can vary and it really depends on what you run and how much the extra thread factors into it.
Load average is a ball park figure. It's not that definitive. Hyperthreading muddles the issue even more.
From your original question.
Each socketed CPU has a specified number of cores. With hyperthreading, each core can handle 2 processes, partially. They basically pipeline commands and hope the results of the 1st command sequence allow for the 2nd command stream to utilized on the same data. If the 1st command determines that the 2nd stream shouldn't run, then that computation is thrown out and you don't benefit from that calculation.
oracle@db1:~> lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Thread(s) per core: 2
Core(s) per socket: 8
CPU socket(s): 2
.
.
.
If you turn off hyperthreading, then you will have 1 thread per core and things become very simple.
1*8*2 = 16
Your maximum load average should be around 16. You can typically run 20% higher than your total number of physical cores and still be functional, but you will notice your system running slower. When you hit a load average of 50% above your physical CPUs, expect your system to slow to a crawl and become unresponsive.
Load average is a ballpark number.
In your original question, lscpu shows 32 CPUs.
That was derived by multiplying
Threads per core * Cores per socket * CPU sockets
2*8*2 = 32
Hyperthreading does not actually give you that much extra load handling. Plan for an extra 20%-40% before you expect things to slow down, because the extra stream of commands can get thrown out. So you should be ok with load averages of 19-22 when you have hyperthreading turned on. It can vary and it really depends on what you run and how much the extra thread factors into it.
ASKER
Thank you very Much Serialband. I liked the explanation.
Please say yes or no to make myself clear and put this to my manager
1. cpu socket is the physical part of CPU [ one which has multi core CPU ]
2. And Each socket has multipe cores
3. Always if I multply no of sockets with no of cores in one Socket CPU , I will get no of physical CPUs right ?
4)
processor : 26
physical id : 2
siblings : 16
core id : 2
cpu cores : 8
a) In this physical id 2 means it is on second socket
b) this socket has 8 cores
c) processor 26 is nothing but 2nd core of 8 cores
Am I correct ?
Also lscpu gives no of physical processor as count [*2 if hyperthreading is on]
Is this also correct and this machine does not have 256 physical processors right ?
Please say yes or no to make myself clear and put this to my manager
1. cpu socket is the physical part of CPU [ one which has multi core CPU ]
2. And Each socket has multipe cores
3. Always if I multply no of sockets with no of cores in one Socket CPU , I will get no of physical CPUs right ?
4)
processor : 26
physical id : 2
siblings : 16
core id : 2
cpu cores : 8
a) In this physical id 2 means it is on second socket
b) this socket has 8 cores
c) processor 26 is nothing but 2nd core of 8 cores
Am I correct ?
Also lscpu gives no of physical processor as count [*2 if hyperthreading is on]
Is this also correct and this machine does not have 256 physical processors right ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nice explanation and explains to missing parts also
uptime
should display load averages