Implement fast and slow computations for Private Memory Footprint on Linux. |
||||||
Issue descriptionFast computation uses private resident + compressed/swapped. Slow computation walks all memory regions to collect detailed stats.
,
Apr 3 2017
hjd is doing some experiments here correlating the full computation from /proc/pid/smaps with the fast approximation from /proc/pid/{statm,status} as described in the doc #1.
,
Apr 5 2017
,
Apr 5 2017
Primiano and I experimented. Still finalizing the doc but it seems like the fast calculation is a pretty good approximation. https://docs.google.com/document/d/1gF3JVf10J0xr2u13gNKWW63tMTMBrGG_aLzgS0XfdhE/edit#
,
May 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a28aa41324c5572e67d57c610fccd22132df3de4 commit a28aa41324c5572e67d57c610fccd22132df3de4 Author: hjd <hjd@chromium.org> Date: Wed May 03 11:32:50 2017 memory-infra: Plumb platform_private_footprint to MemoryDumpManager BUG= 707019 Review-Url: https://codereview.chromium.org/2852473002 Cr-Commit-Position: refs/heads/master@{#468941} [modify] https://crrev.com/a28aa41324c5572e67d57c610fccd22132df3de4/base/trace_event/memory_dump_manager.cc [modify] https://crrev.com/a28aa41324c5572e67d57c610fccd22132df3de4/base/trace_event/memory_dump_request_args.h [modify] https://crrev.com/a28aa41324c5572e67d57c610fccd22132df3de4/base/trace_event/process_memory_totals.h [modify] https://crrev.com/a28aa41324c5572e67d57c610fccd22132df3de4/services/resource_coordinator/public/cpp/memory/memory_instrumentation.typemap [modify] https://crrev.com/a28aa41324c5572e67d57c610fccd22132df3de4/services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.cc [modify] https://crrev.com/a28aa41324c5572e67d57c610fccd22132df3de4/services/resource_coordinator/public/cpp/memory/memory_instrumentation_struct_traits.h [modify] https://crrev.com/a28aa41324c5572e67d57c610fccd22132df3de4/services/resource_coordinator/public/interfaces/memory/memory_instrumentation.mojom
,
May 8 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/90e0440fbcc073544c8645595268e641ad8e51a5 commit 90e0440fbcc073544c8645595268e641ad8e51a5 Author: hjd <hjd@chromium.org> Date: Mon May 08 13:00:25 2017 Fill in PlatformPrivateFootprint on Linux 1/2 This CL populates the rss_anon_bytes field of the PlatformPrivateFootprint struct on Linux. The struct contains platform specific numbers that will be used by the memory-infra service to compute the private memory footprint of the process. BUG= 707019 Review-Url: https://codereview.chromium.org/2839733004 Cr-Commit-Position: refs/heads/master@{#469968} [modify] https://crrev.com/90e0440fbcc073544c8645595268e641ad8e51a5/base/trace_event/process_memory_totals.h [modify] https://crrev.com/90e0440fbcc073544c8645595268e641ad8e51a5/components/tracing/common/process_metrics_memory_dump_provider.cc [modify] https://crrev.com/90e0440fbcc073544c8645595268e641ad8e51a5/components/tracing/common/process_metrics_memory_dump_provider.h
,
May 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bae6b3bcfa9dccd18b061beafcb17d0dbd39a7c9 commit bae6b3bcfa9dccd18b061beafcb17d0dbd39a7c9 Author: hjd <hjd@chromium.org> Date: Wed May 17 04:18:05 2017 Fill in PlatformPrivateFootprint on Linux 2/2 This CL populates the vm_swap_bytes field of the PlatformPrivateFootprint struct on Linux. The struct contains platform specific numbers that will be used by the memory-infra service to compute the private memory footprint of the process. BUG= 707019 Review-Url: https://codereview.chromium.org/2866723002 Cr-Commit-Position: refs/heads/master@{#472321} [modify] https://crrev.com/bae6b3bcfa9dccd18b061beafcb17d0dbd39a7c9/base/process/process_metrics.h [modify] https://crrev.com/bae6b3bcfa9dccd18b061beafcb17d0dbd39a7c9/base/process/process_metrics_linux.cc [modify] https://crrev.com/bae6b3bcfa9dccd18b061beafcb17d0dbd39a7c9/components/tracing/common/process_metrics_memory_dump_provider.cc
,
May 17 2017
,
Apr 3 2018
Are we always using fast method? I think slow method undercounts dalvik regions (/dev/ashmem/dalvik-), which are essentially anonymous. See implementation of MemMap::MapAnonymous(use_ashmem=true) in art/runtime/mem_map.cc. Treating "/dev/ashmem/dalvik-" similarly to regions NOT starting with "/" in the script from the document reduces difference between fast and slow methods to 856K (from 2608K).
,
Apr 3 2018
,
Apr 3 2018
We use the fast method to compute PMF: https://cs.chromium.org/chromium/src/services/resource_coordinator/public/cpp/memory_instrumentation/os_metrics_linux.cc?l=201 |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by erikc...@chromium.org
, Mar 30 2017