Evaluate running GPU process separately from browser in Svelte/Android Go mode |
||||||||||
Issue descriptionCurrently GPU process runs as part of the browser process in Svelte mode. For Android Go, we should evaluate whether it makes sense to run it separately. Cons: * Memory overhead of an extra process when in foreground * More likely to get killed Pros: * Background memory use significantly reduced if we drop priority when in background or kill the process What I'd like to know is the amount of overhead running GPU separately has on Android Go configuration (512MB device running O). And what's the background memory use without GPU process on Svelte. This could perhaps be measured by running memory.top_10_mobile benchmark that we use for System Health reports in two configurations.
,
Feb 21 2017
,
Feb 22 2017
,
Feb 24 2017
,
Mar 27 2017
,
Jun 28 2017
,
Jun 29 2017
I ran the system_health background stories. The memory usage of the processes: process PD PSS in out in out Browser 17 15.5 56 47.5 Renderer 33 33 71 66 GPU - 12 - 24 Total 51 60 127 138 On Killing Gpu process: Total 51 48 127 126 PSS=126 because the shared memory of GPU process will mostly remain even if we kill GPU process. The apk and so mmap or even the textures backed by SharedMemory since renderer will keep them alive. So, I am assuming that the PSS will reduce only by the private dirty of the GPU process which does not give us any win over having GPU process inside browser.
,
Jun 29 2017
I can investigate the 3MB difference in private dirty. I know for sure that the ShaderTranslator is kept in memory even when going to background.
,
Jun 29 2017
Yep, having an understanding of the 3MB difference would be good. Alex, looks like after the GL context drop change, the background memory savings from killing GPU process are minimal, but the overhead of running a separate process is 9-11MB. My conclusion from this would be that we should keep it in-process for low-end devices given that our GPU crash rates are not too bad.
,
Jun 29 2017
OK, thanks for the measurements. I can accept the pure memory case for splitting the GPU process isn't there. In practice, it seems that the WebGL being blacklisted when the GPU process is not split is the most noticeable consequence of this: see http://crbug.com/730306 . For 512MB devices it's a niche consideration, but if starting in Android O we're going to blacklist WebGL for all 1GB devices (the most popular category of devices), and I expect that will be noticed and complained about more widely, and possibly drive away developers from WebGL.
,
Jun 29 2017
What's the reason that WebGL has to be blacklisted when GPU runs in-proc and not blacklisted for out-of-proc?
,
Jun 29 2017
Superficially, WebGL should work fine in-process, as it does in Android WebView for example. But there's a stability reason: WebGL can do crazy stuff to hang the GPU driver and we want to kill and restart the GPU process instead of browser process. Originally WebGL was whitelisted based on presence of the GL "robustness" extension, but this was uncommon and didn't work well even when it was claimed supported, so we switched to GPU process restart as our only recovery mechanism, leaving non-GPU-process devices blacklisted. I think there's security reasons as well but the original reason for the policy was stability.
,
Jun 29 2017
I'm pretty sure the reason for blacklisting WebGL with the in-process GPU on Android was simply that the KHR_robustness extension wasn't behaving very well across a range of devices, rather than because of security issues.
,
Jul 17 2017
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 Deleted