Closed Bug 1191797 (perf-memperf) Opened 9 years ago Closed 2 years ago

[meta] Performance Tools Memory Footprint

Categories

(DevTools :: Performance Tools (Profiler/Timeline), enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ochameau, Unassigned)

References

Details

(Keywords: meta)

STR:

1) open a simple webpage, like data:text/html,foo on a e10s-enabled nightly
2) open about:memory in another tab,
   look at memory usage of the Web content process,
   it is around 20~MB
3) get back to the webpage, open devtools and select performance panel
4) refresh about:memory, you will see the content process bumbed to ~36MB before GC and ~30MB after GC.
5) get back to the performance panel and launch a profile. Stop it after few seconds (~10s).
6) refresh about:memory again, you will see the content process bumbed to ~250MB before GC and ~245MB after GC!!

The 10MB bump when opening the toolbox is somewhat OK (fyi:it is similar increase when just instanciating actors on b2g devices, which is less OK).
But the 215MB bumb when starting a profile is surprising at very least.
On slow hardware it completely freeze firefox for some seconds.
Also we can see a lot and slow GC pauses in the profile on slow hardware.
Are these bugs triaged?
Yes -- will check this one out tomorrow
Discussed with fitzgen & vp; turning this into a metabug for memory usage in perf tools. Some initial ideas:

* Change profiler buffer size for fennec/b2g (feature detect with device.js stats, cap it at some limit)
* Change max allocation log size (cap at some value if low device RAM)
* Dedupe process for TimelineMarker

Alex, do you have any other measurements of what's taking up memory?
Summary: perf tools allocate tons of memory when you start profiling → [meta] Performance Tools Memory Usage
Summary: [meta] Performance Tools Memory Usage → [meta] Performance Tools Memory Footprint
Alias: perf-memperf
Depends on: 1194297
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #3)
> 
> Alex, do you have any other measurements of what's taking up memory?

Unfortunately, most of the memory being used by the profiler ends up in heap-unclassified in about:memory. So I don't have much more info... But you can look at about:memory by yourself, may be there is a nested section somewhere. about:memory is hairy these days, I'm not an expert of it.

Note that it would be really great, if the profile keeps allocating a significant chunk of memory, to be categorized in about:memory! It is always very frustrating to see a big number in heap-unclassified when you are working on gecko.
We could potentially add memory reporters[1] to the profiler to find out where it's all going.  Seems generally useful to have in place.

[1]: https://developer.mozilla.org/en-US/docs/Mozilla/Performance/Memory_reporting
Note we have an ongoing implementation of memory profiler in bug 1123237
Triaging. Filter on ADRENOCORTICOTROPIC (yes).
Keywords: meta
Priority: -- → P1
No longer depends on: 1194454
Depends on: 816598
Severity: normal → enhancement
Keywords: meta
Priority: P1 → P3
Product: Firefox → DevTools

This bug is likely outdated now. We still can do memory improvements in the new profiler but that will be tracked in new bugs.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.