[Webkit-unassigned] [Bug 180861] [GTK][WPE] Enable WebProcess memory monitor

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 16 03:36:38 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=180861

--- Comment #3 from Carlos Garcia Campos <cgarcia at igalia.com> ---
(In reply to Michael Catanzaro from comment #2)
> What is the memory limit?

It depends. There are several limits:

 - thresholdForMemoryKill: this is the one checked to decide whether to kill the process. This is calculated depending on the number of page/tabs in the web process and depending on whether the web process is currently active or not. If the limit is reached, a release memory is done and if after that the limit is still reached then the web process asks the UI to kill it. See:

    size_t baseThreshold;
    if (processState == WebsamProcessState::Active)
        baseThreshold = 4 * GB;
    else
        baseThreshold = 2 * GB;
    if (tabCount <= 1)
        return baseThreshold;
    return baseThreshold + (std::min(tabCount - 1, 4u) * 1 * GB);

 - UsagePolicyBasedOnFootprint: this is to decide whether to try to free some memory or not depending on the web process current memory footprint. If the policy is set to Unrestricted nothing happens, if Conservative then non-critical memory is released and Strict tries to release all possible memory. See:

    switch (policy) {
    case MemoryUsagePolicy::Conservative:
        return 1 * GB;
    case MemoryUsagePolicy::Strict:
        return 1.5 * GB;
    case MemoryUsagePolicy::Unrestricted:
    default:
        ASSERT_NOT_REACHED();
        return 0;
    }

We might want to make this configurable, though. In a device with 1GB of RAM these values don't make sense.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171216/057f5874/attachment.html>


More information about the webkit-unassigned mailing list