|How to make sense out of "top" command |
| 6:53 pm on Aug 6, 2004 (gmt 0)|
I was using command "top", and tried to see how my php scripts perform when i was running the MS stress tool with stress tool. Those php scripts are just some simple scripts, which take inputs and store them into mysql.
but i got like around 40% total cpu usage, isn't it too much for just three php scripts?
And one other thing, is there any better command or tool that i can use to monitor the system resources, instead of command "top"
coz, i had to manually recorded the values from "top" command", and then average up those values. But those values vary a lot, so the result isn't quite revelent. many thanks
| 10:09 pm on Aug 6, 2004 (gmt 0)|
might have what you are looking for..
| 10:23 pm on Aug 6, 2004 (gmt 0)|
haha, i was the person who started that topic... -__-"
haha... thanks anyway =)
| 11:06 pm on Aug 6, 2004 (gmt 0)|
You really should look at total server load, not per-process CPU usage. At the top of the top(1) display there are three decimal numbers representing the number of processes waiting for the CPU now, an average for the past five minutes, and an average for the past fifteen minutes. These three numbers are the "load average"
Its ok if the first load average spikes above one, but as the five and fifteen minute averages push up past one you may need to look into doing some tuning. Your box may be able to consistently run with "high" load averages (3+ 5+) without any perceptible slowdown.
You may also have a poorly performing script that is not CPU dependent at all, but instead has to wait on IO. You can determine this kind of problem if pages serve more slowly with many concurrent requests, but the load averages do not increase to match.
PS: It is nearly useless to compare the load average on two differently configured machines (both hardware and software). It is only useful for seeing how much work your machine is doing now compared to some point in the past.
| 10:34 pm on Aug 10, 2004 (gmt 0)|
thanks drbrain =)
agree, i have no idea why they want to compare two different machine... ><"
When i used the ms stress tool with 50 concurrent threads, it spent me 100% cpu usage... does that makes sense?
what monitoring tool is available in unix to check cpu usage?
i have searched online, all i found are top and vmstat. Are they the same thing?
| 5:50 pm on Aug 13, 2004 (gmt 0)|
See also the tuning man page (your system should have one). Depending on platform you'll have utilities like:
systat, pstat, iostat, vmstat, and netstat.
top and vmstat are typically used to monitor CPU usage.
See your system's manpages for more information.
100% CPU usage on 50 concurrent request threads seems about right, that's 50 independent users accessing pages as fast as they can.
| 10:29 pm on Aug 13, 2004 (gmt 0)|
May all ur wishes come true =)