0

How bad/normal/good is this CPU usage?

Cpu0  : 14.4%us,  6.3%sy,  0.0%ni, 78.8%id,  0.0%wa,  0.0%hi,  0.5%si,  0.0%st
Cpu1  : 88.3%us,  8.0%sy,  0.0%ni,  0.0%id,  0.0%wa,  0.0%hi,  3.7%si,  0.0%st

We get CPU usage alerts ranging between (80-88%) from a specific group of servers (that handles the most important parts of our application) every once in a while. I don't normally don't take actions on them because I see most of the usage is in the %us space. I look at it as the sign of a healthy system working efficiently. I am in the process of composing an email to our team trying to explain when should we panic and when should we not on these CPU alerts? My questions are:

Is it fair to say that as long as %wa and %sy are not too high, a CPU with a high usage in %us column indicates a healthy system than a crowded system.

Is it right in thinking that even 95% of CPU usage is not a problem with the server as long as it is at %us column?

If the server is at 88% CPU usage at %us, am I right in thinking that most probably the tuning has to be done in the application? Again, this 88% usage is not affecting the performance, so is it better to leave it like that and accept the fact that our application is highly CPU bound?

This particular server runs on RHEL 6.5 and runs a java process with more than 800 threads most times.

closed as primarily opinion-based by slm Nov 2 '14 at 15:15

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Can you post the outputs of vmstat and uptime. With your current top output it doesn't look like a severe issue. And more over if the load is spiking only for a period of a time then you need to check what caused it at that time – Kannan Mohan Nov 3 '14 at 7:29
2

This really seems like the kind of question you should answer yourself: keep statistics while the machine is operating normally for a while (e.g. a week), and this will give you some idea of what the parameters of normal operation should be.

Your snapshot shows you more or less maxing out one of two cores. Since your main process is multi-threaded, this probably means there's still lots more CPU for it to grab if required.

As to whether 85 or 95% user is "too high", it isn't really a problem for the OS, no. I believe it's only a problem for the hardware if this leads to overheating of the CPU. Obviously the more you use something the more likely the chance of failure in a given time period, but that doesn't mean more frequent use has caused the failure. By analogy: you could drive 1000 km a day and have your car break down after 13 weeks at ~100 000 km, or you could drive 100 km a day and have your car break down after 2 years at ~100 000 km. In a computer, the core hardware (excepting storage and memory) is much more likely to become obsolete first, I do not think it is particularly prone to wearing out through use.

WRT to user vs. sys time, excessive sys time may be indicative of peripheral hardware failure. This will likely be in spikes and hopefully accompanied by error messages in the system log. As to how much is too much, most of the time it should be mostly user. Again, keeping statistics for a week should help you determine this.

  • since its mainly %us, I assume that the tuning has to be done in the application, am I right? CPU usage is going up high in a specific set of servers that is running a specific application. All of the other servers are running fine. – Sree Nov 3 '14 at 4:39
  • Yeah, or you could distribute the task if possible, but again, they don't all have to be the same. If one system averages 40% usage and another doing something different averages 85%, they are both okay. You just want to get some statistics on how they normally run so you can catch anomalous behavior. – goldilocks Nov 3 '14 at 13:40

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