WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 164589
[Linux] Memory values shown by memory pressure handler logger are not useful
https://bugs.webkit.org/show_bug.cgi?id=164589
Summary
[Linux] Memory values shown by memory pressure handler logger are not useful
Carlos Garcia Campos
Reported
2016-11-10 06:41:24 PST
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.
Attachments
Patch
(10.02 KB, patch)
2016-11-10 06:47 PST
,
Carlos Garcia Campos
mcatanzaro
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2016-11-10 06:47:56 PST
Created
attachment 294368
[details]
Patch
Carlos Garcia Campos
Comment 2
2016-11-10 07:05:22 PST
Committed
r208536
: <
http://trac.webkit.org/changeset/208536
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug