New issue
Advanced search Search tips

Issue 869414 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

[Feature] Be more lenient on tab discarding when chrome isn't at fault for high memory usage

Project Member Reported by gab@chromium.org, Jul 31

Issue description

Chrome Version: M70-
OS: All

What steps will reproduce the problem?
(1) Have a reasonable amount of tabs
(2) Run a short-lived memory expensive task (e.g. |git gc|)

What is the expected result?
Short-lived task takes a lot of memory, some chrome memory is paged out. When task completes everything is smooth again.

What happens instead?
All my tabs got discarded.

Perhaps we should be less aggressive with discarding when the memory pressure isn't caused by chrome? e.g. if a non-chrome process is using the majority of the memory.
Especially if short-lived (e.g. I could see that a long gaming session in fullscreen justifies killing some tabs).

I think being able to auto-reload when memory comes back would also be a great solution to allow us to get out of the way more under pressure (as it would silently hurt less).
 
Cc: sebmarchand@chromium.org
This is because of how the current memory pressure signal is implemented, currently as soon as the amount of free memory falls below 400MB (on machine with a large amount of RAM) you enter into the Critical Memory Pressure state and this triggers the urgent tab discarding.

This 400MB value might be too high, from what I've observed it's easy to hit this value if you run some memory expensive tasks, but the OS will always try to keep at least ~200MB of free memory (by paging out pages). If you get below the 200MB threshold it usually correlates with a really high swap thrashing.

I think that aggressively discarding when the memory pressure isn't caused by Chrome is something we want. E.g. you probably don't want Chrome to slow down the startup of a memory expensive app (the idea is to be a good citizen on the platform and to not slow down other applications).

I think aggressive discarding is only justifiable if we also have a mechanism to automatically bring back tabs. Otherwise we're like an OS that aggressively swaps out but never swaps in.
I agree, bringing back tabs is a must have IMO, we should distinguish tabs that have been discarded because we consider them as non-important and tabs that have been urgently discarded.

I'll write down all the info/complaints I have about the current memory pressure signal in a doc soon.

Sign in to add a comment