0

I am getting some warning from my Debian 8 server through nagios about average cpu load where top shows load average: 4.01, 3.66, 3.37

.... Sometimes increased to 5 where it shows critical. i am using php5-fpm and nginx with magento in this server. It has 20 cores and 12 GB ram.

top - 10:46:12 up 46 min,  1 user,  load average: 3.47, 3.57, 3.38
Tasks: 257 total,   8 running, 249 sleeping,   0 stopped,   0 zombie
%Cpu(s): 23.5 us,  0.6 sy,  0.0 ni, 75.9 id,  0.0 wa,  0.0 hi,  0.1 si,  0.0 st
KiB Mem:  12327560 total,  9178948 used,  3148612 free,   451868 buffers
KiB Swap:  5241852 total,        0 used,  5241852 free.  4740264 cached Mem

Could anybody help me about this issue? What is the normal CPU load average for this machine?

Muhammad Bilal
  • 2,106
  • 1
  • 15
  • 24
  • Hi, the load average means the number of process that are waiting to enter the cpu to be executed. There is no "normal" load average, as the smallest machines can have low load average if they are idle. I would recomend to install htop (sudo apt-get install htop) and look which process is using that much of a cpu, or is collapsing the threads of the cpu and begin the investigation from there. – flaixman Dec 28 '18 at 09:56
  • Hi, Thanks for the reply. i have installed htop and found php-fpm: pool www are using most of the CPU and there are several thread of php-fpm. – Rakib Uddin Ahmed Dec 28 '18 at 10:04
  • Okay, that means that the php app is using the cpu. But the machine you are using, a load average of 5 is pretty decent for a 20 core machine. It means that the machine is not idle, but it's not that charged. I would increase the warning level to 5 and critical to 10. – flaixman Dec 28 '18 at 10:12
  • Thanks for the suggestion but it was same two days ago. Everything was okay there suddenly why? – Rakib Uddin Ahmed Dec 28 '18 at 10:42
  • Is there any similarity? (hour of the day, minute of the hour, something)? Maybe the cpu load comes from the php because some other long process is using the cpu threads without that big of an impact, and php process look like they use much more cpu than normally (but just happens that it only have less cpu to use for the same process as always). Try to strace a normal thread of that php,look if the threads that charge the cpu are from an exact url (maybe some part of the application is more cpu intensive than the others), maybe cache is renewing if you have one.Could be a lot of things. – flaixman Dec 28 '18 at 10:54
  • Maybe if you look at the logs at the hour frame the load happened, you may see similarities on the type of requests you have. Or maybe is a periodic process. Anyway, a load average of 5 on a 20 core machine is not a problem. – flaixman Dec 28 '18 at 10:57

0 Answers0