My server Load jump high up top 22, CPU just 50%, RAM 1858/5120. How to know what process couse so high load average. Linux Debian
4 Answers
$ grep processor /proc/cpuinfo |wc -l
4
That gives you the number of CPUs on your system. If the load average is higher than this number, but CPU is just 50%, there are good chances that you system is performing a lot of IOs. In which case:
aptitude install iotop
iotop will give you a list of processes consuming disk IOs.
-
I have cloud server CPU are 4 nad 50%, after I order 8 CPU use 8 % load average down in 1.5, but if order 7 CPU load average jump to 22 again... when I install iotop gives me error:File "/usr/bin/iotop", line 16, in <module>.... Oct 10, 2011 at 16:28
How to know what process couse so high load average.
You can use top
, press O (o in uppercase), follow by l (CPU Time), and Enter.
zombie process can influence load average too, May I suggest :
mike@mike-:~$ ps -eo state |uniq -c
171 S
1 R
1 D
2 S
--> here you can count the number of process for each state
D (process blocked waiting for a resource)
Z Zombie
--> typical issue for the D status a process using a file on a NFS share who doesnt answer anymore... Hope it helps
You can use one of those three commands. Read the man
or info
pages for more information.
uptime - Tell how long the system has been running.
w - Show who is logged on and what they are doing.
top - display Linux processes
All three commands show you the load average
information. top
is probably the best choice as it displays information about CPU usage, memory usage, priority, etc.
I cite from a reference of a course:
Load average is the average of the load number for a given period of time. It takes into account processes that are:
- Actively running on a CPU.
- Considered runnable, but waiting for a CPU to become available.
- Sleeping: i.e., waiting for some kind of resource (typically, I/O) to become available.
I cite further about interpreting load average:
The load average is displayed using three different sets of numbers, as shown in the following example:
The last piece of information is the average load of the system. Assuming our system is a single-CPU system, the 0.25 means that for the past minute, on average, the system has been 25% utilized. 0.12 in the next position means that over the past 5 minutes, on average, the system has been 12% utilized; and 0.15 in the final position means that over the past 15 minutes, on average, the system has been 15% utilized. If we saw a value of 1.00 in the second position, that would imply that the single-CPU system was 100% utilized, on average, over the past 5 minutes; this is good if we want to fully use a system. A value over 1.00 for a single-CPU system implies that the system was over-utilized: there were more processes needing CPU than CPU was available.
If we had more than one CPU, say a quad-CPU system, we would divide the load average numbers by the number of CPUs. In this case, for example, seeing a 1 minute load average of 4.00 implies that the system as a whole was 100% (4.00/4) utilized during the last minute.
Short term increases are usually not a problem. A high peak you see is likely a burst of activity, not a new level. For example, at start up, many processes start and then activity settles down. If a high peak is seen in the 5 and 15 minute load averages, it would may be cause for concern.