Question about top output

The load average is for your VPS. I think the CPU is also the percentage your VPS is using, but not very sure about this. I think the top output is all about your own VPS. Maybe someone else can confirm.
 
I believe that load average is for your own VPS but that CPU load is for the whole system.

The CPU cannot be divided like ram and hard drive and that is why they say you get an "equal share".
 
Its not the load of the server. The CPU line is showing the percentages of the node's CPUs (processor power) being used for different purposes.
 
Mylinear,

If that were true then why is the process list only showing 2 processes using 1% of CPU? Where is the other 47% at?
 
Dan, just to clarify...

You said:
that CPU load is for the whole system.
I said:
The CPU line is showing the percentages of the node's CPUs (processor power) being used for different purposes.
I mean the same thing as you said. When I said "node", I mean the underlying physical server (whole system), not the individual VPS.
 
Guys by looking at this, does it give any indication why the server load was so high at that time?

The reply I got for my ticket was that it seemed like a DDOS attack as two ip address had huge number of apache connections. But wouldn't that also lead to large amount of memory being used and also a large number of processes being present in the top output?

Add to that, the CPU load which has been under lined in green color, shows that maximum CPU time has been assigned to WA, which I guess is waiting, which would point to either a process not allowing any other process to use the CPU or disk IO issue.

What you guys think?
 
Everything that "top" shows inside the VPS is related to the VPS itself, "top" doesn't show any processes or utilization figures for the physical server.

The top output shows significant amount of CPU time being spend on disk operations, also according to the output provided process # 23270 was doing something disk intensive. This could be anything from writing large chunks of data (i.e. spitting out php errors into the log), opening huge directories with a lot of files in them, writing any regular data to the filesystem (i.e. saving uploaded file, etc). There could be other processes that were trying to do something related to disk activity but were not included in top. The full list of processes including their operational status can be obtained with the help of "ps auwwwfx" command. If process is spending a lot of time during that operation and one got lucky enough to be able to catch and trace it while it is still running there is a good chance that it will be possible to find out what it is doing exactly using the "lsof -np PID" and "strace -s4096 -Ff -p PID" (warning - may generate huge output) commands.
 
Paul,

So first off what's listed in top everywhere pertains only to our VPS. This is a bit surprising to know as there have been times when I have seen higher numbers there and nothing happening on my VPS at the time to account for it.

In Yogesh's case if he were to run "ps auwwwfx" it would list the process/es that were consuming so much CPU? Because from what top is showing there isn't anything.
 
Paul,

So first off what's listed in top everywhere pertains only to our VPS. This is a bit surprising to know as there have been times when I have seen higher numbers there and nothing happening on my VPS at the time to account for it.

Correct and something suppose to be happening - if system is completely idle (no cpu / disk i/o activity) it will show LA at 0.00 and CPU usage at 0% regardless of what is happening on the physical server.

In Yogesh's case if he were to run "ps auwwwfx" it would list the process/es that were consuming so much CPU? Because from what top is showing there isn't anything.

"top" sorts processes by CPU consumption by default and shows only most CPU active ones, "ps" will show a list of all processes running on the system including their execution status (i.e. "S", "R", "D", etc - more information about process states can be found in the "man ps" man page. S* would show up for processes in the "sleep" state - processes that don't do anything at this specific moment but wait for, say, incoming connections, signal from other process, etc. Anything other than S* shows processes that aren't sleeping. Most common states would be R (running) and D (in most cases waiting for disk i/o).
LA counters depend on average number of processes in any state but S* state.
 
Thanks Paul for the explanation, I think the issue might have been caused by a MYSQL cron job that was supposed to take backup of the forum database at 1pm IST and might have been some delayed due to high forum activity hence started causing trouble around 1:30pm - 2:30pm.

Have gone ahead and disabled it and hopefully that would solve the issue (was originally setup to take backups at night but that changed when my account was migrated to vps and switched the server time to IST).

Apart from that we didn't have any thing else running that was supposed to write to the file system, apart from the forum database, which was at peak discussion time.
 
Top