[Toybox] CPU always maxed in top
enh
enh at google.com
Fri Jun 7 23:10:41 PDT 2019
On Fri, Jun 7, 2019 at 8:37 PM Rob Landley <rob at landley.net> wrote:
>
> On 6/5/19 5:26 AM, makepost wrote:
> > On Wed, Jun 05, 2019 at 03:34:02AM -0500, Rob Landley wrote:
> >> 400%cpu 22%user 0%nice 9%sys 370%idle 0%iow 0%irq 0%sirq 0%host
> >> The 400% cpu means it's a 4x SMP system, that's the total available CPU.
> >>
> >> 370% idle means 30% of one CPU is used (22% user and 9% sys, mostly chromium
> >> background noise), and the remaining 3 and 3/4 processor time is idle.
> >
> > Sorry. I didn't immediately remember this was intentional.
>
> I could change it to say 4xSMP perhaps?
>
> I could also have it display 400-idle, but the reason I didn't do that is if you
> sit down at a machine you're unfamiliar with you don't immediateley know what
> the numbers mean without the reference.
>
> Sigh. The htop bar graph (or text equivalent, ala CPU:100 37 100 0) gives you
> the actual info.
and automatically scales to MiB and GiB as appropriate, because KiB is
too small even on a phone these days :-P
(actually, that's only true in the bar graphs. in the process list,
it's using color to make KiB readable... it'll use GiB/MiB for large
things, but for small stuff it uses KiB and colors the digits
representing MiB in blue. that's really weird.)
> (Cosmetic issues are _hard_. There isn't a right answer, or at least no
> empirical test for one.)
i think another interesting thing here is the conflict between humans
and machines. i did wonder whether -- no matter what we do elsewhere
-- `top -b` should use KiB because it's the best data the machine can
give to another machine, and that's what -b is for. every time we
change any of this stuff, somewhere a badly-written script fails.
but i still think the Mem: and Swap: lines are worse now they're back in KiB.
> > Had a busybox
> > window aside, and it got no total field for CPU count, starts with user
> > percentage. Toybox differing in that it lets 100% represent one core
> > rather than all CPUs, across all fields, was clear from the varying 370%
> > in idle, so the total may be unnecessary:
>
> It was clear in your use case, on a machine you were already familiar with.
>
> The individual processes go from 0-100% of a processor, I.E. 0-100% of what a
> single process (thread) can use. Then the numbers up top are what you get if you
> add those up, I.E. are in the same scale as the numbers below. But the numbers
> up top aren't describing a process, they're describing the machine. 100% of the
> machine is tough to describe with SMP (hyper-threading, burst mode, etc. And
> don't get me started on cache local vs memory bus limited...)
>
> >> 400%cpu 22%user 0%nice 9%sys 370%idle 0%iow 0%irq 0%sirq 0%host
> >> ^ ^ ^
> >
> > But some redundancy is okay, just got confused. Never mind.
>
> It's a useful data point. It needs to be improved. It's on the todo list.
>
> Rob
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net
More information about the Toybox
mailing list