Add SubframeShutdownDelay experiment
This change adds experiment SubframeShutdownDelay, which delays
shutdown of subframe renderer processes by a few seconds. This
experiment aims to increase the chance for subframe processes to be
reused, particularly when navigating between pages that share a common
subframe domain. Successful subframe-process reuse saves the cost of
process recreation, which can take ~3 seconds of CPU time per
navigation. This savings needs to be balanced against the memory cost
of keeping each subframe renderer alive a few seconds longer.
To this end, the experiment has multiple branches with different
delays, in order to determine the best-performing method:
* constant: a flat 2s delay
* constant-long: a flat 8s delay
* history-based: a 0-8s delay; the median
TimeSinceReusableProcessDestroyed in the past 5 subframe
navigations, with "no reuse possible" counting as 0s
* history-based-long: a 0-8s delay; the 75th-percentile
TimeSinceReusableProcessDestroyed in the past 5 subframe
navigations, with "no reuse possible" counting as 0s
* memory-based: a 2s delay when available memory is under 8 GB, and a
2-8s delay when it is higher, up to 16 GB
These will be enabled via Finch, and can be manually enabled by
appending command-line flag:
--enable-features="SubframeShutdownDelay:type/constant
where "constant" can be any of the above experiment labels.
Design doc:
https://docs.google.com/document/d/1x_h4Gg4ForILEj8A4rMBX6d84uHWyQ9RSXmGVqMlBTk/edit
Bug: 894253
Change-Id: I64c64532d6185412d7f3f97bf9917de9574aecc4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2431587
Commit-Queue: Jesse McKenna <jessemckenna@google.com>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Olivier Li <olivierli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#875466}
GitOrigin-RevId: 3447a7a52eecea83be3ddb03ae65d4c2f8df5b43
1 file changed