New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 642515 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
not on Chrome anymore
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

CPU Usage in task manager should be displayed with more precision

Project Member Reported by brucedaw...@chromium.org, Aug 30 2016

Issue description

Chrome's task manager shows CPU time as a percentage of total available CPU time, as an integral percent. This means that on a 4-core/8-thread system a thread that runs continuously will show up as 12 percent (truncated from 12.5%). A thread that is 3% busy will show up as zero percent (truncated from .375%). One Chrome developer machines with 48 threads the behavior is even crazier - a 20% busy thread will show up as 0% busy (truncated from 0.4166%).

Two solutions seem possible:
1) Change from percentage of total available CPU time to percentage of a core. This means that numbers would range from 0% to N*100% (so up to 800% on an eight-thread machine). This has the advantage of making numbers more comparable between machines with different numbers of threads, but would be a change in how the numbers are interpreted and would make all of the numbers bigger, and incompatible with task manager and process explorer.

2) Display more digits of precision. The Windows 10 task manager's Processes tab displays CPU usage to a tenth of a percent. Process Explorer from sysinternals displays to a hundredth of a percent. One hundredth of a percent would be ideal for many-core machines.

I'd like to see option #2.
 
Cc: stanisc@chromium.org nick@chromium.org
It looks like CPU is already shown with one decimal digit on MacOS.

#if defined(OS_MACOSX)
// Match Activity Monitor's default refresh rate.
const int64_t kRefreshTimeMS = 2000;

// Activity Monitor shows %cpu with one decimal digit -- be consistent with
// that.
const char kCpuTextFormatString[] = "%.1f";
#else
const int64_t kRefreshTimeMS = 1000;
const char kCpuTextFormatString[] = "%.0f";
#endif  // defined(OS_MACOSX)

Comment 3 by creis@chromium.org, Aug 31 2016

Note: Mac shows per-core values, so it's possible to see 100% CPU usage if a single tab goes into a busy loop.  (I actually much prefer that to showing something like 2% to mean that one core is pegged, but I'm probably just used to it.)
I'd love to have per-core values - I agree that they make much more sense. But, since Task Manager and Process Explorer on Windows both display per-system values I think we have to be consistent with that :-(

I'd be happy to have somebody talk me out of that...
Here is the prototype for showing %CPU with one decimal digit on all platforms.

https://codereview.chromium.org/2314303002/diff/1/chrome/browser/ui/task_manager/task_manager_table_model.cc

Cc: -stanisc@chromium.org
Owner: stanisc@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b42085e1042ac37fd3c7928dc8050e69f42c5773

commit b42085e1042ac37fd3c7928dc8050e69f42c5773
Author: stanisc <stanisc@chromium.org>
Date: Thu Sep 29 02:43:26 2016

Task Manager: format CPU usage with one decimal digit on all platforms

This is a fairly trivial change that adds one decimal point
to CPU usage precision on Windows and Linux. It is already
displayed with that precision on Mac OS.

BUG= 642515 

Review-Url: https://codereview.chromium.org/2314303002
Cr-Commit-Position: refs/heads/master@{#421725}

[modify] https://crrev.com/b42085e1042ac37fd3c7928dc8050e69f42c5773/chrome/browser/ui/task_manager/task_manager_table_model.cc

Status: Fixed (was: Assigned)

Sign in to add a comment