Fenix: [Bug] Very high heap-unclassified memory usage

Created on 9 Mar 2020  ยท  14Comments  ยท  Source: mozilla-mobile/fenix

Steps to reproduce

No specific steps I've found, though I noticed this when opening and closing many tabs even when the overall number of tabs open at any one time isn't much, as well as when using Twitter for a while

Expected behavior

Memory usage stays reasonable

Actual behavior

High memory usage causing Android to kill background apps and eventually Fenix even in foreground. Device usually gets very sluggish before this happens.
I've seen heap-unclassified usage being 2 gb before while the rest of memory usage was in the low 100s of mb.

Device information

Essential PH-1

  • Android device: 10
  • Fenix version: Nightly 200309 06:01 (Build #2015727539)
performance triage ๐Ÿž bug

All 14 comments

Triage: ecsmyth vaguely remembers existing issues like this with Twitter's redesign: we should follow-up with platform perf team.

Followed up on whether this is issue is important to the Platform Perf team .. as per acreskey's comment.._I think this issue could be important (particularly since I'm not aware of any running tests for memory consumption over time). But I think someone could spend some time narrowing it down a bit._

My 5 cents: i also gave 2GB RAM and see this misbehavior only since upgrade to 4.*. Any chance to bring Fenix back to normal mem usage?

Filed bug https://bugzilla.mozilla.org/show_bug.cgi?id=1625499 to track Performance platform work to address this issue.

We really need some steps to reproduce this bug to help narrow down what's happening. Are there some sites that seem to cause the heap unclassified measurement to climb more than others?

@KazaHesto at the time that this occurs, are you able to share what sites you have loaded?

(Bonus points if responses to my last comment can be posted to https://bugzilla.mozilla.org/show_bug.cgi?id=1625499)

Triage: this sounds like a platform issues (since JVM memory is classified as such) but that assumption may not hold true and there may be FE digging to be done. That being said, it's not a priority right now so adding to low impact.

I am experiencing the same issue on an Android 9 device with 4GB RAM. Fenix's high RAM usage causes Android to gradually terminate background processes (including the launcher) and eventually crashes Fenix.

Web pages with embedded videos (such as Twitter) are most prone to triggering this issue.

A fix for one of the root causes - leaking a screen capture every time the app is foregrounded or resumed (BZ-1655580) - has landed in GeckoView 81 and should be already in the current AndroidComponents main branch (see commit aa4567a).

Edit: And it has landed in Nightly 200803 06:07 - My heap-unclassified memory does not grow anymore and stays below 10 MiB ๐ŸŽ‰ Note: This is on a Full HD-device with software buttons. Other users might observe different values since it depends on the resolution of the display, e.g. a user with 3168x1440 screen size sees values around 18 MiB.

@KazaHesto Can you still reproduce this problem on the latest Nightly?

Version: Nightly 200807 06:01 (Build #2015756531)

Following the STR given in https://github.com/mozilla-mobile/fenix/issues/11284#issuecomment-650122756:

  • Step 4 is ~8 MB.
  • Step 6 is ~ 19 MB.
  • Step 9 goes back to ~8 MB.

These are all Main + Web totalled.

Thanks @opusforlife2 :) That looks fine.

I can also report that BZ-1655580 has been uplifted to Beta and is now fixed in Beta 80.0.0-beta.4 (Build #2015756489) ๐ŸŽ‰

@mcomella Since all corresponding BZ issues have been resolved (BZ-1655580, BZ-1655578, BZ-1625499), I think we can close this issue? Edit: It also just got uplifted to release (79.0.5) so this should hopefully arrive before the rollout is completed.

Thanks @hwinnemoe โ€“ given we can't contact the original reporter and we're in the process of addressing our known memory issues particularly leaks, I think we can close this.

Please reopen if you're still experiencing this behavior, particularly the heap-unclassified part.

Was this page helpful?
0 / 5 - 0 ratings