Updates:
Status: Available
Owner: ---
Cc:
tap...@chromium.org
Comment #71 on issue 391646 by
tap...@chromium.org: tab spinner
I've done some analysis on Linux. tl;dr: there's a 19% improvement in *CPU*
usage after r362878 for Chrome showing a single throbber. r362878 is also
the first step in exploring composited throbber animations which could take
this a lot further.
"19%" = 22.23 +/-0.18 CPU seconds over 5 minutes going to 18.07 +/-0.09 CPU
seconds.
Longer story:
The tooling is still not ideal -- the power draw analysis I was able to do
on a Macbook gives a much nicer number to optimize against, and encompasses
all chrome processes and the GPU chip.
I think for Linux and GPUs there's a minefield of problems. Kernel/x11
drivers, hardware support, various window managers and compositors really
make a mess of things. I wasn't able to reproduce the pathological case in
Issue 534970 any more - a single throbber (layered or unlayered) on my
setup didn't spike above ~10% CPU. Tried a bunch of window managers with an
NVIDIA card (GF108GL [Quadro 600]) all using DRI but not always a
composited window manager.
For *GPU* utilization, it also hovers around 10% according to nvidia-smi
(NVIDIA's closest thing to intel_gpu_top). Statistically, this is unchanged
with/without layering for the throbber. nvidia-smi doesn't give numbers any
more precise than whole percentages.
To arrive at "19%" I did:
Pin the CPU at 1200MHz to rule out frequency scaling.
In the background: `nc -kl 8080` to accept connections.
For 5 minutes, run `chrome
http://localhost:8080
--user-data-dir=<initially empty dir>`.
1 warmup run, then repeat 20 times for each of {layered, unlayered}
throbber
Collect total CPU utilization for all UI process tasks
Average over the 20 runs. Error range is the 90% confidence interval for
the true mean.
Script, data files and a plot attached.
Since there's other performance stuff going on between releases, I couldn't
really pinpoint whether r362878 was specifically involved without
recompiling, so I made release builds at ToT r367046 (~49.0.2606.0).
However, spot checks against CPU utilization show that it's comparable.
Note the "CPU seconds measured" is just the UI process: On my setup,
Chrome's GPU process showed a similar reduction in utilization (but as said
above, the GPU *chip* didn't show a significant change when measured with
nvidia-smi). To isolate layered/unlayered, I just had
TabController:CanPaintThrobberToLayer() return true or false.
Moving to available since I'm not active on this right now, but might be
inspired to work on it closer after more analysis on Mac with the full
power draw.
There still might be a pathological case that takes {CPU or GPU}
utilization up much higher (Issue 550961 perhaps?), but I haven't been able
to reproduce it.
10% utilization of the GPU chip (a Quadro 600 in this case) might also be
something worth improving, but 10% (on my window manager) is pretty normal
for something updating a character-sized portion of the screen ~30 times a
second in any program (i.e. not just Chrome). I haven't figured out how to
break the GPU chip utilization down into things being "done" by Chrome, the
window manager/compositor, or by GPU/DRI drivers.
Attachments:
throbber-linux-unity.png 35.0 KB
throbber_perf.sh 742 bytes
layer_false.txt 966 bytes
layer_true.txt 966 bytes