[Mac] Capture memory pressure stats in UMA |
||
Issue descriptionCurrently the memory pressure monitoring system captures memory pressure level data in UMA (Memory.PressureLevel) on Windows. We should be capturing the same info on the Mac. https://uma.googleplex.com/p/chrome/timeline_v2/?sid=bbf2e336653b4407331ca61e7b5ac962
,
Nov 28 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f518237b7651d1eeb115bffcc51f11ee0e9078cc commit f518237b7651d1eeb115bffcc51f11ee0e9078cc Author: lgrey <lgrey@chromium.org> Date: Mon Nov 28 15:51:57 2016 [Mac] Report statistics more regularly in Mac memory pressure monitor Currently, we only report UMA statistics on receiving a pressure change event from the system. This means that we could be missing many ticks of "normal" pressure from sessions that never encounter pressure, skewing our stats. Other platforms don't have this issue since they poll. This change piggybacks statistic reporting on GetCurrentPressureLevel() which is called regularly by RendererFrameManager::GetMaxNumberOfSavedFrames() This also allows us to enable reporting for Sierra. To make this work, GetCurrentPressureLevel is now declared non-const. There don't appear to be any const MemoryPressureMonitors in the codebase at the moment, so this should be safe. BUG= 655304 Review-Url: https://codereview.chromium.org/2495003004 Cr-Commit-Position: refs/heads/master@{#434660} [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/base/memory/memory_pressure_monitor.h [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/base/memory/memory_pressure_monitor_chromeos.cc [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/base/memory/memory_pressure_monitor_chromeos.h [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/base/memory/memory_pressure_monitor_mac.cc [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/base/memory/memory_pressure_monitor_mac.h [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/base/memory/memory_pressure_monitor_win.cc [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/base/memory/memory_pressure_monitor_win.h [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/chrome/browser/chromeos/resource_reporter/resource_reporter_unittest.cc [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/chromecast/browser/cast_memory_pressure_monitor.cc [modify] https://crrev.com/f518237b7651d1eeb115bffcc51f11ee0e9078cc/chromecast/browser/cast_memory_pressure_monitor.h
,
Dec 2 2016
Looks like we're getting data for canary. Comparing vs. Windows canary, it percentage of time spent in moderate/critical pressure is lower, but I'm not sure if that's a difference between what platforms consider critical, more low-end Windows machines, programmer error or one of another million reasons. Marking fixed for now nonetheless.
,
Dec 2 2016
I was looking at this data last night - great to have it! It appears that on Windows, the memory pressure levels are based on free memory being within certain ranges whereas on the Mac it's based on if the system is compressing pages in RAM (WARNING) or swapping to disk (CRITICAL). As I see it the different platform memory pressures are therefore not comparable because on Windows, WARNING means you have less free memory available but on the Mac there might be ample free memory that can be reclaimed through compression. |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Nov 7 2016