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

Issue 646236 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Evaluate overhead of additional mus apps and windows

Project Member Reported by fsam...@chromium.org, Sep 13 2016

Issue description

Each mojo app in Mus+Ash adds a ui::Compositor which has a LayerTreeHost/LayerTreeHostImpl. This implies a separate raster pool, and tile scheduler. This als means that all apps in the system could be fighting for resources to generate content on screen. This could have performance and battery life implications. We need to find a way to measure the cost of poor scheduling, if any, and consider solutions if necessary.

This may or may not be a problem depending on the workload we'd like to run on the system. We should attempt to understand the overhead of all the extra ui::Compositors and TaskGraphRunners in the system. This bugs tracks metrics to evaluate this overhead.
 
Antoine points out that Chrome Apps today have Chrome renderers and so they also introduce a compositor thread and all associated overheads so perhaps we're no worse than before. However, this also isn't a very scalable system. Part of the Mus+Ash effort has been about dicing Ash into multiple apps (although I think we've scaled back in the short term)? So we are introducing new overheads that didn't exist before.
Components: MUS

Comment 3 by sky@chromium.org, Sep 13 2016

Indeed we will have more than apps than we had before. At a minimum we'll have ash as it's own app, so that's one more. We've also split some seldom used functionality (touch-hud, auto-click) into their own apps as well. We could look to merge these if it's problematic to have more apps.
Chatting with Scott offline: In Chrome OS previously, all Chrome OS UI and browser UI had a single ui::Compositor.

In Mus+Ash, currently SysUI has a ui::Compositor, and each browser window has a ui::Compositor.

I think this will likely be an issue today with Mus+Ash.

Comment 5 by sadrul@chromium.org, Sep 13 2016

Summary: Evaluate overhead of additional mus apps and windows (was: Evaluate overhead of additional mojo apps and windows)
Each mus app currently creates a SingleThreadTaskGraphRunner, which creates a separate thread. So we have one additional thread for each toplevel window. It should be possible to use at most a single thread for all windows in a client. We still end up with an additional thread for each client.

If we want to avoid this extra thread per client, we could perhaps have a TaskGraphRunner impl that runs the tasks on an existing thread (something like SynchronousTGR, but that integrates better with the SingleThreadTaskRunner, perhaps)? What kind of perf issues do we expect this to have?
OK, that's good! One thread instead of n (where n > 1)! The issue I am worried about is LayerTreeHostImpl is scheduling raster for each app separately. This might not be too bad because we do this on non-Chrome OS platforms too.
With that said, there is a possibility of some kind of regression due to the fact that we have a different scheduler in each window where we once had one scheduler.

Comment 8 by sadrul@chromium.org, Sep 13 2016

Following up on comment #5: we already share a TaskGraphRunner for all windows in a single client. So the overhead for that now is: one additional thread in each mus app. It's not obvious to me what kind of metric would tell us how badly this is affecting performance.
sadrul@: It's not just about threads, it's also different schedulers. Rather than a single scheduler per screen, we have one per window effectively. Maybe this is not significant, maybe it is.

I would imagine CPU usage spikes would be higher if launching multiple apps in rapid succession. Not sure if there's a better way to test this...not sure...
Components: Internals>MUS
Status: Available (was: Untriaged)
Project Member

Comment 12 by sheriffbot@chromium.org, Feb 21 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Internals>MUS Internals>Services>WindowService
Components: -MUS
Labels: -Proj-Mustash-Mus
Migrating Proj-Mustash-Mus to components Internals>Services>WindowService and Internals>Services>Ash

Labels: -Hotlist-Recharge-Cold -Proj-Mustash Proj-Mash-MultiProcess
Status: Available (was: Untriaged)
Bug scrub.

Sign in to add a comment