Closed Bug 1142357 Opened 10 years ago Closed 7 years ago

Improve memory tracking

Categories

(Testing :: Talos, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: glandium, Unassigned)

References

Details

(Whiteboard: [talos_wishlist])

I'm not sure exactly at what point memory (RSS, private bytes, others?) is being measured during tp5, but observations from bug 1141079 comment 18 make me think we're dangerously missing some things. For example, if for some (buggy) reason image decoding allocates 1GB, uses it, and then frees it after the image has been displayed, if we measure memory usage after the image has been displayed, we never know that our peak memory usage has gone wild. But peak memory usage may or may not be enough to track. I think ideally we should look at the peak memory usage over some sub intervals of a tp5 run. Note that this may or may not overlap with AWSY, but AWSY is linux only, sadly.
This bug's title is too general. Bug 842800 is about measuring peak memory usage. It's hard to do in a cheap way. But if you just care about process peak RSS on Linux, it's easy: you can read it from the "VmHWM" (for "high-water mark") line in /proc/<pid>/status. Of course, if we add code to read that and subsequently find that we have unexpected peaks, then we won't have much insight into what's causing them. But I guess we can cross that bridge when the time comes.
we measure rss/xres/etc. after each page is done loading and recording the time we measure RSS from inside the browser. The other metrics are collected in a separate thread every 20ms. should we change the linux stuff to include peakRSS (VmHWM) or replace the existing stuff?
Not sure if it's useful, but peak RSS can now be gotten within the browser via nsIMemoryReporterManager.residentPeak.
If we pull from the nsIMemoryReporterManager.residentPeak api, we could get this after each page load. Lately I have been looking at the counters and what we do is: 1) collect a bunch of samples 2) take the average of all the samples and plot it on the graph so this pulls into question how useful these samples are and if we care about more than just the average. Ideally we will switch to measuring counters that we find actionable (i.e. peakRSS) and remove the need for the other counters.
I think we need to do a few things here, right now we have main_rss concerns (bug 1316575) and private byte collection concerns (bug 1279396).
Depends on: 1279396
Whiteboard: [talos_wishlist]
we have switched to relying upon AWSY for memory tracking instead of Talos.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Are we tracking peak memory in AWSY?
(In reply to Mike Hommey [:glandium] from comment #7) > Are we tracking peak memory in AWSY? No, but we can for OSX and Linux. I could probably add Windows as well.
You need to log in before you can comment on or make changes to this bug.