Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

05:54:17 up 6 days, 9:54, 1 user, load average: 15.70, 8.04, 4.56

Load average is a LOT higher than it should be. It was HALF of that a moment ago, I used ps aux to see which processes were using a lot of cpu, and the httpd was using a TON. It had several processes running with 0.9 each. So I restarted the httpd, and now those processes are gone, but the load averages have doubled.

You know, and come to think of it, I could be wrong about what load average means, I've never really looked into it, simply taken the definition of it from a friend who told me it was the cpu consumption, like how many processes are waiting to use cpu, so if I could also get an explanation of what this is, and how I can make it go back down.

But the question I actually came here for: is there a way I can list the processes that are consuming the most cpu?

share|improve this question

3 Answers 3

up vote 2 down vote accepted

htop or just top

share|improve this answer
    
Thanks. Hm, yum is taking up 6.1% cpu, and miniserv.pl is taking up 3.4% Any ideas as to why? –  Rob Apr 25 '10 at 2:33
    
Hm nevermind, yum is taking a ton of cpu, and I can't figure out why –  Rob Apr 25 '10 at 2:55
    
btw you should really install htop ;) it's much nicer than top. –  xenoterracide Apr 25 '10 at 10:22
    
are you sure that this additional load isn't valid http traffic (or something). Seems to me you're running around looking for a screwy process, I'm not yet convinced that you have one. –  xenoterracide Apr 25 '10 at 10:26
    
also keep in mind that a process might consume a spike even up to 100% for a second it's if it maintains that you've got an issue with that process. Load average measure all the processes over ... 15 minutes I think. –  xenoterracide Apr 25 '10 at 10:28

Load is a measure of resource contention, not just CPU usage. If many processes are stuck in a "wait" state (such as due to high disk IO or memory swapping) this can cause high load without an equivalent spike in actual CPU usage. Tools like top and ps can be helpful to a point, especially if you use some of the options to customize the output. For disk and memory utilization, you can try to interpret the output of iostat and vmstat, or install a utility such as iotop

share|improve this answer

loadav just tells you how many processes are queuing to run; you can be bound on disk, network, NFS, lock contention, swapping, or a bunch of other conditions.

I would be inclined to install sar (and use the -d option for disk stats) to collect data over time and see what's going on; this will give you reasonably detailed breakdowns of your CPU, memory profile, and disk behaviour.

As a quick rule of thumb, if you have significant "idle" time showing in vmstat, top, atop, dstat, sar, and such tools, you aren't running out of CPU, you're running out of some other resource.

You could also take a look at dstat, which has some nice plugins to inspect application misbehaviour.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.