-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mesh appears to increase memory usage in Chrome #45
Comments
I should also add that I did compare against libc malloc as well, and Mesh did appear to slightly outperform libc malloc. |
We have a utility that @bpowers wrote that we used to perform full memory accounting: https://github.com/bpowers/mstat. This is a pretty accurate way of capturing memory consumption over time. Would be great if you would try that and report those results. |
This is super exciting! I would love to hear more, especially if you were able to run under |
Are these observations still valid? Mesh got some important updates, Chromium as well... |
Not sure if this counts as an issue, but I figured this was the easiest way to share my results for anybody interested.
I spent some time getting Mesh working in Chrome, which was a bit challenging as Chrome does some interesting things around process creation for security reasons, etc.
For anybody else interested in trying out Chromium with Mesh enabled, here are the steps to get it working on Linux:
Note that both Chrome and Mesh have to be built without debugging - Chrome won't start up in debug mode (not sure why), and Mesh hits debug assertions.
Test procedure
I benchmarked memory usage using Chrome's performance benchmarking tooling, specifically the memory.long_running_desktop_sites benchmark. Here's the command I used:
$ LD_PRELOAD=~/mesh/libmesh.so tools/perf/run_benchmark run memory.long_running_desktop_sites --output-dir perftest --browser-executable=out/Default/chrome --extra-browser-args="--disable-setuid-sandbox --disable-namespace-sandbox --no-sandbox" --browser exact --pageset-repeat=1
Results
Chrome uses tcmalloc by default on Linux, so these numbers are all in comparison to Chrome using tcmalloc with the same flags (and my patch), just without the gn args to customize the allocator and the LD_PRELOAD.
The most reliable number, reported_by_os:system_memory:private_dirty_size increases by 15%
reported_by_os:private_footprint_size (RssAnon + VmSwap) appears to decrease by 42%, but memfd allocations don't seem to be accounted for in RssAnon which may be a kernel accounting bug.
reported_by_chrome:effective_size also looks really promising, but that's only because Mesh returns 0s for mallinfo() right now.
Full results can be found here: results.html.tar.gz
The first column is with Mesh enabled, the second column is with tcmalloc.
I don't plan on digging any deeper into this myself, but others are welcome to.
The text was updated successfully, but these errors were encountered: