mpkapadia
09-04-2001, 03:42 PM
On my server i use top command to monitor server loads at times,
It usually fluctuates between 89% to 99% (Free cpu) , this is most of the times,
Sometimes if gzip or something else is run the free cpu goes as low as 1 $ , but gzip is not used that much on the server as such , i use it just once in 2-3 days or so.
i want to know how much is considered an acceptable limit for free cpu usage.
What output do you get when top command are run on your server
Regards
Manish Kapadia
valkaryn
09-04-2001, 06:00 PM
Unix likes to be effecient with its CPU utilization. It's basic nature is multi-threading and considerate of priorities based on the user who's running it and what they have set the priority for the process to.
Many processes on Unix that require a bit of CPU will take any CPU time they can get access to unless something comes along that says, "excuse me, I more important than you, please move aside".
There are more statistics to watch before your CPU stats, such as IO and memory/virtual memory. If your IO is queing up in the buffer, it will slow down your networking or disk reads/writes. If your physical memory is constantly allocated and your system start dipping deeply into the virtual memory pool it will affect your IO (because it usually is writing/reading to the disk) and the extra CPU time to manage that will create a state referred to as "thrashing", which basically means that your machine is so busy reading and writing virtual memory to the hard disk that it has taken over (its a higher priority!) CPU time to manage that instead of doing the original process in the first place.
Learn to read iostat, netstat, and vmstat in conjunction with reading the top report. You may not understand them in the beginning, but after a while you will find that you've developed a sense of what the combined information is telling you.
If your machine is at 100% CPU utilization fairly constantly, but nothing queueing in the buffers you are using your machine efficiently. It's when it starts queueing things constantly that you want to monitor it closely and consider upgrading soon.
Good advice. I just want to add that your load averages are more important than the actual CPU usage at any given point. Top's CPU time isn't highly accurate, it's only showing you a sample from a given microsecond in time...
The load averages will show you the average load on the machine. It's difficult to say what constitutes a "high" load average, though, as this depends on many things. A 2.2 kernel can't handle as high a load as 2.4 can (generally speaking).
What you'll want to do is judge where your machine seems to top out; when performance starts to suffer, note the load averages, and try to keep them below that point. In general, though, anything over 5 is bad; 3 is probably not ideal, either, but again it really depends on the specific machine.