I'm having trouble understanding the information displayed by htop the popular replacement for the Linux top command.

htop screen dump

In the above screen shot, there are many java instances listed, but only the parent one uses CPU time. What are the others?

Why do the CPU utilisation bars show such busy cores when the CPU% column shows not much happening across all processes? In fact, they move without correlation most of the time.

Why is the Load Average, top right, which I assume is a 3 step history, so low when the cores are almost always green and looking busy?

Would someone be so kind to explain how to read this information?

Thank you!

  • I've made some changes which help a lot. Display threads in a diff color, show thread names, update process names on refresh, and mostly, changing the delay to 2/10 second. The default update speed just shows a massive lag between the CPU meters and the processes. Jan 23 '13 at 2:01
  • 1
    For load average at least, that isn't necessarily a low value. The load is essentially an indicator of if the system has to wait to do something. An acceptable value is less than the number of cores, in this case 4. So those averages are reasonable. They are the last 1, 5, and 15 minutes. For more info, see [Wikipedia](en.wikipedia.org/wiki/Load_(computing))
    – ssmy
    Jan 23 '13 at 3:11
  1. Regarding "Load" and CPU%, wikipedia has detail explanation and example, following is a partial quote

    An idle computer has a load number of 0 and each process using or waiting for CPU (the ready queue or run queue) increments the load number by 1. Most UNIX systems count only processes in the running (on CPU) or runnable (waiting for CPU) states. However, Linux also includes processes in uninterruptible sleep states (usually waiting for disk activity), which can lead to markedly different results if many processes remain blocked in I/O due to a busy or stalled I/O system. This, for example, includes processes blocking due to an NFS server failure or to slow media (e.g., USB 1.x storage devices). Such circumstances can result in an elevated load average, which does not reflect an actual increase in CPU use (but still gives an idea on how long users have to wait).

    Systems calculate the load average as the exponentially damped/weighted moving average of the load number. The three values of load average refer to the past one, five, and fifteen minutes of system operation.

    For single-CPU systems that are CPU bound, one can think of load average as a percentage of system utilization during the respective time period. For systems with multiple CPUs, one must divide the number by the number of processors in order to get a comparable percentage.

    The bars maybe busy moving, but they never reach 100%, which will indicate the cpu/core is fully utilized. The bar is only a visualization of the cpu utilization %, which are at 27%, 26.5%, 24.5%, 24.7% and 71.7%. All cpu cores still have power to "spare". They are all under utilized at that point.

    A fully utilized 5 core/cpu system will have load 5 or above.

  2. Regarding the Java rows, they are parent(PID=5073) and child processes. I cannot explain why the parent accumulate the most cpu time. That really depends on the internal logic of the program. However, according the TIME+, those child processes did consume cpu time, with the last one (PID=5074) accumulated the most.

  • Is it possible that the child processes are the JVM threadpool? When I set the option to show thread names they're all named the same. I'm a Windows + .NET programmer, fyi. Jan 24 '13 at 10:46
  • Yes, it is possible they are thread.
    – John Siu
    Jan 24 '13 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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