Consider more aggressive Tab unloading in ASan Nightly builds
Categories
(Firefox :: Tabbed Browser, enhancement, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox69 | --- | affected |
People
(Reporter: decoder, Assigned: decoder)
References
(Blocks 1 open bug)
Details
In ASan Nightly, each content process starts to consume more and more memory the longer it runs (due to the nature of ASan itself, it needs to quarantine freed memory per process). It would be acceptable to unload idle/inactive tabs if the content process reaches a certain age, has performed a certain amount of loads and/or has exceeded a certain memory usage.
:gsvelto, it would be good to have your thoughts on this (in particular which approach you think might be the most suitable). Thanks!
Comment 2•5 years ago
|
||
I've spent some time thinking about this because there doesn't seem to be a simple solution. IIUC an ASAN content process will always grow in size, even if we trim it by unloading tabs and sending it memory-pressure events. So eventually we'll need to kill the process and start a new fresh one, right? Assuming we have a way to detect when a process has become to big for our tastes we'll need a mechanism to identify which tabs belong to it and try to unload them all. With some luck eventually we'll be able to kill the content process w/o the user noticing and when the tabs will be reloaded they'll end up in another process.
AFAIK we don't have a mechanism to easily map tabs to processes & vice-versa and I don't know how tricky it would be to implement. Detecting when we want to "empty" a process should be easier. One way to do it would be to monitor each process size and once one passes a certain threshold (e.g. 20% of total available memory) it becomes a candidate for complete unloading.
Does a mechanism like this sound reasonable?
Comment 3•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Updated•2 years ago
|
Description
•