Understanding Load Average, ‘top’ Command

Load Average is caused by two things

1. Cpu it self is busy/overloaded  in processing things

2. Processes  (typically called Blocking process) in run queue, waiting for I/O

Andy Miller nicely  explained with screen shots to find what cause the high load average.

Here is Screen shot from ‘Top’ command

The third line from top need due concern i.e. Cpu(s)

If the first two figures %us and %sy are near to 90% then Cpu is overloaded and needs to be upgrade.

If the 5th figure in same line %wa is shows high numbers means there are some jobs in run queue waiting for I/O (may be trying to read data from mounting disk). Then look for that.

To diagnose which process causing this just run a command

ps faux

and look ‘D’ under 8th column STAT one. There may be lots of R and S as well.

D —> Waiting for either (CPU, Disk I/O, Network I/O)

R —-> Running

S —–> Sleeping

I use the command

ps axo stat,pid | grep D

to find the process with stat D

Here is link where i learned all that

http://www.andymillar.co.uk/blog/2006/12/24/linux-load-average-explained/

Thanks to Mr. Andy Millar.

No more fear of ‘top’ Command.Have fun!

Advertisements

One Comment on “Understanding Load Average, ‘top’ Command”

  1. Sam thomas says:

    Very well defined


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s