117

On Ice Cream Sandwich, an option in the Developer Options is "Show CPU Usage", which adds an overlay on the screen (see screenshot below).

My question is, how do I read the data ? I guessed that the package names are the process currently actives, but what does the red and green bars behind mean ? Also what are the 3 numbers on top of the packages ?

enter image description here

3
  • 1
    Do we have anything similar to this for RAM?
    – Behnam
    Feb 17, 2014 at 13:45
  • 3
    My 3 "load averages" are about 9.0. The green and red bars are almost invisible, reaching about 5% screen width in graphically intensive games, whereupon the "load averages" hit about 10.0. My phone is a quadcore and the battery lasts ages. I think the answers here are incomplete.
    – John
    Oct 16, 2014 at 17:18
  • 2
    @Campiador This is about 1 year late, but for RAM you can run c:\> adb shell vmstat <ENTER> to examine info about memory. CD over to your android-sdk-windows\platform-tools\ for adb.
    – raddevus
    Dec 3, 2015 at 18:55

5 Answers 5

80

This should be the Unix load average. Wikipedia has a nice article about this.

The numbers show the average load of the CPU in different time intervals. From left to right: last minute/last five minutes/last fifteen minutes

8
  • 2
    From the developers site: Show CPU usage Displays CPU meters at the top of the screen, showing how much the CPU is being used. The top red bar shows overall CPU usage, and the green bar underneath it shows the CPU time spent in compositing the screen. Note: You cannot turn this feature off once it is on, without restarting the emulator. developer.android.com/tools/debugging/debugging-devtools.html
    – Rolf ツ
    Sep 25, 2012 at 12:39
  • 47
    "Green is time in userspace, red is time in the kernel, blue is io interrupt time." - Dianne Hackborn groups.google.com/forum/?fromgroups=#!topic/android-platform/…
    – Bo.
    Sep 26, 2012 at 6:21
  • 1
    Is there one bar per core? I only see 2 bars, but I have a quadcore device. Does that mean I'm not using all my cores?
    – Ken
    Oct 8, 2012 at 21:33
  • 5
    @Ken: The bars are the average load of the whole CPU not the cores. The top bar shows the CPU usage of the OS and all programs and the other bars show the CPU usage of the specific program. So don't worry, Android uses all cores.
    – nkr
    Oct 9, 2012 at 7:45
  • 1
    I'm confused a bit. Dianne Hackborn says: Green = userspace, Red = Kernel, Blue = interrupt but on the developer site it says: red = overall CPU usage, Green = compositing the screen. Doesn't sound exactly the same, right? Oct 23, 2014 at 17:46
10

So far this has been the most helpful source of information regarding this I could find. Apparently the numbers do NOT reperesent load average in %: http://forum.xda-developers.com/showthread.php?t=1495763

1
  • 3
    load average is never in %
    – Sparr
    Jun 20, 2016 at 17:38
3

More about "load average" showing CPU load over 1 minute, 5 minutes and 15 minutes

Linux, Mac, and other Unix-like systems display “load average” numbers. These numbers tell you how busy your system’s CPU, disk, and other resources are. They’re not self-explanatory at first, but it’s easy to become familiar with them.

WIKI: example, one can interpret a load average of "1.73 0.60 7.98" on a single-CPU system as:

during the last minute, the system was overloaded by 73% on average (1.73 runnable processes, so that 0.73 processes had to wait for a turn for a single CPU system on average).
during the last 5 minutes, the CPU was idling 40% of the time on average.
during the last 15 minutes, the system was overloaded 698% on average (7.98 runnable processes, so that 6.98 processes had to wait for a turn for a single CPU system on average) if dual core mean: 798% - 200% = 598%. 

You probably have a system with multiple CPUs or a multi-core CPU. The load average numbers work a bit differently on such a system. For example, if you have a load average of 2 on a single-CPU system, this means your system was overloaded by 100 percent — the entire period of time, one process was using the CPU while one other process was waiting. On a system with two CPUs, this would be complete usage — two different processes were using two different CPUs the entire time. On a system with four CPUs, this would be half usage — two processes were using two CPUs, while two CPUs were sitting idle.

To understand the load average number, you need to know how many CPUs your system has. A load average of 6.03 would indicate a system with a single CPU was massively overloaded, but it would be fine on a computer with 8 CPUs.

more info : Link

3

As other answers have pointed, on UNIX systems the numbers represent CPU load averages over 1/5/15 minute periods. But on Linux (and consequently Android), what it represents is something different.

After a kernel patch dating back to 1993 (a great in-depth article on the subject), in Linux the load average numbers no longer strictly represent the CPU load: as the calculation accounts not only for CPU bound processes, but also for processes in uninterruptible wait state - the original goal was to account for I/O bound processes this way, to represent more of a "system load" than just CPU load. The issue is that since 1993 the usage of uninterruptible state has grown in Linux kernel, and it no longer typically represents an I/O bound process. The problem is further exacerbated by some Linux devs using uninterruptible waits as an easy wait to avoid accommodating signals in their implementations. As a result, in Linux (and Android) we can see skewed high load average numbers that do not objectively represent the real load. There are Android user reports about unreasonable high load averages contrasting low CPU utilization. For example, my old Android phone (with 2 CPU cores) normally shown average load of ~12 even when the system and CPUs were idle. Hence, average load numbers in Linux (Android) does not turn out to be a reliable performance metric.

1

From High Performance Android Apps book (page 157):

  • what we see is equivalent of adb shell dumpsys cpuinfo command
  • Numbers are showing CPU load over 1 minute, 5 minutes and 15 minutes (from the left)
  • Colors are showing time spent by CPU in user space (green), kernel (red) and IO interrupt (blue)

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.