RESOLVED FIXED 183773
WebProcess memory monitor thresholds should be better tuned for embedded systems.
https://bugs.webkit.org/show_bug.cgi?id=183773
Summary WebProcess memory monitor thresholds should be better tuned for embedded syst...
Carlos Alberto Lopez Perez
Reported 2018-03-20 05:09:32 PDT
The current thresholds for the WebProcess memory monitor are hard-coded and doesn't make sense on an embedded system where having 1GB or 512MB of RAM is usual.
Attachments
Patch (3.58 KB, patch)
2018-03-20 05:50 PDT, Carlos Alberto Lopez Perez
no flags
Patch (3.59 KB, patch)
2018-03-20 08:20 PDT, Carlos Alberto Lopez Perez
no flags
Carlos Alberto Lopez Perez
Comment 1 2018-03-20 05:50:01 PDT
Carlos Alberto Lopez Perez
Comment 2 2018-03-20 08:20:21 PDT
Created attachment 336125 [details] Patch Patch v2, try to fix windows build
Adrian Perez
Comment 3 2018-03-20 15:24:54 PDT
Comment on attachment 336125 [details] Patch Informal r=me. Reading this patch makes me think that we might want to think whether it might make sense to provide some API which allows programs to set their own thresholds — each embedded application is a different beast. Dunno. At any rate, your proposed improvements look much better to me than the current hardcoded values, so I hope others agree and this can be landed.
Carlos Alberto Lopez Perez
Comment 4 2018-03-23 05:00:55 PDT
ping reviewers? all EWS are green.
Yusuke Suzuki
Comment 5 2018-03-23 05:06:12 PDT
Comment on attachment 336125 [details] Patch r=me too.
Carlos Alberto Lopez Perez
Comment 6 2018-03-23 05:41:50 PDT
Comment on attachment 336125 [details] Patch Clearing flags on attachment: 336125 Committed r229894: <https://trac.webkit.org/changeset/229894>
Carlos Alberto Lopez Perez
Comment 7 2018-03-23 05:41:57 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 8 2018-03-23 20:41:57 PDT
Comment on attachment 336125 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336125&action=review > Source/WTF/wtf/MemoryPressureHandler.cpp:152 > + WTFLogAlways("Unable to shrink memory footprint of process (%lu MB) below the kill thresold (%lu MB). Killed\n", footprint.value() / MB, thresholdForMemoryKill() / MB); %lu is not the correct format for a size_t; %zu is correct. This might compile on platforms where size_t happens to be the same as unsigned long, but these %lu should be changed to %zu.
Carlos Alberto Lopez Perez
Comment 9 2018-03-25 12:34:09 PDT
(In reply to Darin Adler from comment #8) > Comment on attachment 336125 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=336125&action=review > > > Source/WTF/wtf/MemoryPressureHandler.cpp:152 > > + WTFLogAlways("Unable to shrink memory footprint of process (%lu MB) below the kill thresold (%lu MB). Killed\n", footprint.value() / MB, thresholdForMemoryKill() / MB); > > %lu is not the correct format for a size_t; %zu is correct. This might > compile on platforms where size_t happens to be the same as unsigned long, > but these %lu should be changed to %zu. I picked %lu because that was used already on this file for other two messages involving size_t, but you're right: %zu should be used instead. I have opened bug 183997 to fix this one and the other two.
Note You need to log in before you can comment on or make changes to this bug.