[Webkit-unassigned] [Bug 164589] New: [Linux] Memory values shown by memory pressure handler logger are not useful

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Nov 10 06:41:24 PST 2016


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

            Bug ID: 164589
           Summary: [Linux] Memory values shown by memory pressure handler
                    logger are not useful
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Keywords: Gtk
          Severity: Normal
          Priority: P2
         Component: Platform
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cgarcia at igalia.com
                CC: bugs-noreply at webkitgtk.org

We are currently using the VmSize field from /proc/self/status which is the virtual memory size of the process and doesn't normally change even when the memory pressure handler manages to release memory. So, most of the time we see that there's no changes in memory usage in the logs:

Memory pressure relief: Empty the PageCache: =dirty (at 8351166464 bytes)
Memory pressure relief: Prune MemoryCache live resources: =dirty (at 8351166464 bytes)
Memory pressure relief: Drain CSSValuePool: =dirty (at 8351166464 bytes)
Memory pressure relief: Discard StyleResolvers: =dirty (at 8351166464 bytes)
Memory pressure relief: Discard all JIT-compiled code: =dirty (at 8351166464 bytes)
Memory pressure relief: Dropping buffered data from paused media elements: =dirty (at 8351166464 bytes)
Memory pressure relief: Purge inactive FontData: =dirty (at 8351166464 bytes)
Memory pressure relief: Clear WidthCaches: =dirty (at 8351166464 bytes)
Memory pressure relief: Discard Selector Query Cache: =dirty (at 8351166464 bytes)
Memory pressure relief: Prune MemoryCache dead resources: =dirty (at 8351166464 bytes)
Memory pressure relief: Prune presentation attribute cache: =dirty (at 8351166464 bytes)
Memory pressure relief: Run malloc_trim: =dirty (at 8351166464 bytes)
Memory pressure relief: Release free FastMalloc memory: =dirty (at 8351166464 bytes)

We should use the actual memory used by the process, memory that the process can release and then it's relevant for the memory pressure handler. Using other fields from /proc/self/status we could do something like VmRSS - (RssFile + RssShme), but there's also /proc/self/statm that provides the same information in a single. The main different is that statm provides both resident and shared memory directly, but in number of pages, so we need to multiply by the size of the page.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161110/6c448ae8/attachment.html>


More information about the webkit-unassigned mailing list