Investigate impact of App memory limits
Categories
(Firefox for Android :: Tooling, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox152 | --- | fixed |
People
(Reporter: mcarare, Assigned: mcarare)
References
Details
(Whiteboard: [fxdroid][group6] )
Attachments
(1 external file)
Android 17 introduces app memory limits based on the device's total RAM to create a more stable and deterministic environment for your applications and Android users.
In Android 17, limits are set conservatively to establish system baselines, targeting extreme memory leaks and other outliers before they trigger
system-wide instability resulting in UI stuttering, higher battery drain, and apps being killed. While we anticipate minimal impact on the vast majority of app sessions, we recommend the following memory best practices,
including establishing a baseline for memory.
https://developer.android.com/about/versions/17/behavior-changes-all#app-memory-limits
Updated•7 months ago
|
| Assignee | ||
Updated•6 months ago
|
| Assignee | ||
Comment 1•6 months ago
|
||
Investigation: Android 17 introduces conservative "App memory limits" based on device RAM to prevent system instability. When these limits are hit, the OS kills the app with REASON_OTHER. The documentation specifies that the exit description in ApplicationExitInfo will contain the string "MemoryLimiter:AnonSwap" in these cases. Our current telemetry was bucketizing these into a generic "other" category, changes are needed to measure the impact of this new OS behavior.
We should update ApplicationExitInfoMetrics.kt to inspect the description field when the exit reason is REASON_OTHER, that allows us to establish a baseline for how often Fenix sessions are impacted by Android 17's new memory management policies.
| Assignee | ||
Comment 2•6 months ago
|
||
- Refactored
toProcessExitReasonto accept the fullApplicationExitInfoobject instead of just an integer reason code. - Added a check for "MemoryLimiter:AnonSwap" within the exit description when the reason is
REASON_OTHER, mapping it to a new "memory_limiter" metric value.
| Assignee | ||
Comment 3•6 months ago
|
||
Investigation: Android 17 introduces conservative "App memory limits" based on device RAM to prevent system instability. When these limits are hit, the OS kills the app with REASON_OTHER. The documentation specifies that the exit description in ApplicationExitInfo will contain the string "MemoryLimiter:AnonSwap" in these cases. Our current telemetry was bucketizing these into a generic "other" category, changes are needed to measure the impact of this new OS behavior.
We should update ApplicationExitInfoMetrics.kt to inspect the description field when the exit reason is REASON_OTHER, that allows us to establish a baseline for how often Fenix sessions are impacted by Android 17's new memory management policies.
Comment 6•6 months ago
|
||
Backed out for causing lint failures
- Backout link
- Push with failures
- Failure Log
- Failure line: file:///builds/worker/checkouts/gecko/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/perf/ApplicationExitInfoMetrics.kt:59:38: error: Unresolved reference. None of the following candidates is applicable because of a receiver type mismatch:
Comment 8•6 months ago
|
||
| bugherder | ||
| Assignee | ||
Updated•6 months ago
|
Description
•