Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Issue 2566083002: Add peak memory usage metric

Created:
4 years ago by keishi
Modified:
4 years ago
CC:
chromium-reviews, asvitkine+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add peak memory usage metric PeakMemoryUsageTracker is used to track the max Memory.Total2 so far. When the peak increases we send the peak memory usage relative to the amount of physical memory. By sending how high the peak memory usage is relative to available memory, I hope to find out how often users encounter OOM situations. BUG=

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -4 lines) Patch
M chrome/browser/metrics/chrome_metrics_service_client.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/metrics/chrome_metrics_service_client.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/metrics/metrics_memory_details.h View 2 chunks +22 lines, -1 line 2 comments Download
M chrome/browser/metrics/metrics_memory_details.cc View 3 chunks +33 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
keishi
I am writing a document on this but I think the biggest problems with the ...
4 years ago (2016-12-12 09:31:02 UTC) #3
haraken
This is an interesting metric. LGTM to try. It will take months to figure out ...
4 years ago (2016-12-12 11:41:00 UTC) #5
Primiano Tucci (use gerrit)
My concern here is that we are now introducing a concept of "Peak" in UMA ...
4 years ago (2016-12-12 11:58:44 UTC) #6
haraken
On 2016/12/12 11:58:44, Primiano Tucci wrote: > My concern here is that we are now ...
4 years ago (2016-12-12 12:26:28 UTC) #7
Primiano Tucci (use gerrit)
On 2016/12/12 12:26:28, haraken wrote: > On 2016/12/12 11:58:44, Primiano Tucci wrote: > > My ...
4 years ago (2016-12-12 13:13:04 UTC) #8
haraken
4 years ago (2016-12-12 15:57:07 UTC) #9
On 2016/12/12 13:13:04, Primiano Tucci wrote:
> On 2016/12/12 12:26:28, haraken wrote:
> > On 2016/12/12 11:58:44, Primiano Tucci wrote:
> > > My concern here is that we are now introducing a concept of "Peak" in UMA
> that
> > > will not match the peak that we will have in other memory metrics thanks
to
> > the
> > > work that ssid is doing in [1] and will make the current UMA even harder
to
> > > understand.
> > 
> > Hmm, how can we make the two more consistent?
> 
> So here's my concern in practice:
> As long as you introduce UMA of the form "Memoy.MemoryCoordinator.X" it is
clear
> that this is something specific to MC and only you folks will use it.
> But if you introduce Memory.Peak, now everybody will start monitoring that as
a
> general metric. People will use to draw their own conclusions in their
> experiments and most of the time the data presented by this UMA will be
> misleading (see below).
> In other words, I think that if we add general-purpose UMA like this we have
> have to be confident we are delivering a quality signal and not just noise.
> People are then going to spend lot of time on these signals and bike-shed on
> them. And we don't want to end these discussion with the usual "ah no this is
> just because of the way the UMA is sampled".

Yeah, this makes a lot of sense.

The point is that we'll need a lot of experiments to get more understanding of
the renderer and choose UMAs which should be promoted to Memory.XXX. I agree
that we should avoid using Memory.XXX until we are confident that the UMA is
something we want to keep tracking in long term. Maybe we can use
Memory.Experiments.XXX.

keishi@: Would you try to publish your survey document before landing these
UMAs? I think the document will clarify the motivation.


> 
> With reference to the current CL, I have lot of questions, on top of the ones
> inherited by the weakness of Memory.Total* itself. Specifically:
> - how frequently is the sampling? Is this going to bias only towards
> long-lasting allocations?
> - who resets this peak? from what I read here this is doomed to max-out for
ever
> with no windowing. Which means that this is going to be always dominated by
> things like rastering during flinging or large JS heaps due to the content.
This
> is even worse on Svelte where, IIRC, we recycle the renderer only for
> browser-initiated navigations (e.g., typing a new address in the omnibox) and
> not by renderer-initiated navigations (clicking on links).
> - Why the peak is relative to physical memory and not absolute? This seems a
> somewhat arbitrary decision.
> - The CL title says that the driving motivation is OOM. Do we have any
evidence
> that % peak correlated with OOM? On android OOMs happen way sooner than
getting
> to the physical memory limit, because the lowmemkiller has more heuristics
> (background vs foreground, LRU, type of binding)
> 
> 
> > > I think that the major problem of UMA is the lack of defined metrics that
> > don't
> > > match what we do in the other scenarios.
> > > And this CL seems to add more entropy to the system, introducing a notion
of
> > > "peak memory usage, where, however, peak is not a real peak but only the
> peak
> > of
> > > the metric sampler"
> > > 
> > > [1]
> > >
> >
>
https://docs.google.com/document/d/1-6Y6jsH6qCRIs3b6PNgHJk3SayYoibko0ysb9XpAG...
> > 
> > I was thinking that the peak detection is for background tracing, which
won't
> be
> > able to be enabled on production builds by default. So I thought we'll need
> > another (less accurate) way to measure the peak memory at the per-15-second
> > interval (where UMA reporting is triggered).
> 
> No, one of the points of peak detection is that we can also use it to trigger
> UMA once we have memory-infra uma.

Powered by Google App Engine
This is Rietveld 408576698