Commit 8aa848c
authored
cobalt: Tune CC GPU memory settings to reduce footprint (#7527)
This change tunes two GPU memory settings in the compositor to reduce
its overall memory footprint, particularly on Android devices.
The primary change reduces the amount of memory allocated for offscreen
content prepainting. On most Android devices, this was previously set to
use up to 67% of the compositor's memory budget for prepainting textures
outside the visible viewport. This is lowered to 25%.
Experimental results on an android-qa build on Sabrina show this change
significantly reduces the memory usage of the compositor (the 'cc'
component). When navigating quickly through video content, memory usage
dropped from ~70-80 MB to a more stable ~40-50 MB. Further local testing
showed that reducing this to 0% (disabling prepainting) could lower
usage to 30-40 MB with a minimal impact on user experience. We are
proceeding with 25% for now, but could consider further reductions in
the future.
Additionally, the GPU memory allocation priority was changed from
CUTOFF_ALLOW_NICE_TO_HAVE to CUTOFF_ALLOW_REQUIRED_ONLY. While this did
not show a significant memory reduction in testing, it is a logical
change for our use case, as scrolling is not a primary interaction on
most target devices, making "nice-to-have" allocations for scrolling
less critical.
It's worth noting that while the compositor's component memory
decreased, the peak RSS numbers reported by memory-infra did not show a
clear reduction. However, this metric is known to fluctuate. The impact
of these changes on overall system memory should be verified in
production.
Bug: 4245913131 parent 66a3b56 commit 8aa848c
2 files changed
Lines changed: 20 additions & 0 deletions
File tree
- third_party/blink/renderer/platform/widget/compositing
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
407 | 411 | | |
408 | 412 | | |
409 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
410 | 417 | | |
| 418 | + | |
411 | 419 | | |
412 | 420 | | |
413 | 421 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
32 | 43 | | |
| 44 | + | |
33 | 45 | | |
34 | 46 | | |
35 | 47 | | |
| |||
0 commit comments