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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Dec 16 06:57:44 PST 2017


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

Carlos Alberto Lopez Perez <clopez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clopez at igalia.com

--- Comment #4 from Carlos Alberto Lopez Perez <clopez at igalia.com> ---
(In reply to Carlos Garcia Campos from comment #3)
>  - 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.

Instead of making this configurable, we can have a dynamic thresold that depends on the amount of RAM of the device. A simple rule may be:


baseThresholdForPolicy == std::min(3 * GB, totalSystemRAM)

switch (policy) {
     case MemoryUsagePolicy::Conservative:
         return baseThresholdForPolicy / 2;
     case MemoryUsagePolicy::Strict:
        return baseThresholdForPolicy / 3;
     case MemoryUsagePolicy::Unrestricted:
     default:
         ASSERT_NOT_REACHED();
         return 0;
}

This should give the same values it is already giving if the device has 3GB or more, otherwise it will give values that depend on the amount of RAM and should always make sense.


WDYT?

-- 
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/fad289a7/attachment.html>


More information about the webkit-unassigned mailing list