Report JetsamEvent kill app event to MetricKit

App out of memory and killed by Jetsam event seems not report to MetricKit diagnostic, it only contains crash or watch dog kill (scene create or scene update). So I want to ask to report these issues to MetricKit

Answered by DTS Engineer in 871668022

MetricKit reports jetsam counts — see the cumulativeMemoryResourceLimitExitCount properties hanging off MXAppExitMetric — but it doesn’t report any details in the form of a diagnostic. I did some rummaging and discovered that we already have a enhancement request for this (FB9972410). If you’d like to be notified if and when this is added, I recommend that you file a bug and ask that it be dup’d to that bug.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

MetricKit reports jetsam counts — see the cumulativeMemoryResourceLimitExitCount properties hanging off MXAppExitMetric — but it doesn’t report any details in the form of a diagnostic. I did some rummaging and discovered that we already have a enhancement request for this (FB9972410). If you’d like to be notified if and when this is added, I recommend that you file a bug and ask that it be dup’d to that bug.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

@Joeljiangjiang, what @eskimo said. Here is my feedback as a reference. Please make one and if you're willing share your ask here so I can update mine too.

In short, I want both a diagnostic, and some new properties associated with that memory pressure diagnostic.

FB9972410 (MetricKit: Capture memory usage at time of jetsam and report as diagnostic) April 2022

While the memory metric is insightful combined with the exit metrics, it would be even more powerful to know the memory footprint at the time of jetsam pressure exit.

This would allow one to look at the memory footprint and really evaluate if it is worth investigating, or if the footprint is so low and just the system was memory hungry because of some foreground app.

For example, if the average suspend memory was 38 mb, but there was one instance of 150 mb, it would be good to see that one getting jetsam'd but the others not. Then we know we have an outlier and something wasn't released upon transition to background and it is time well spent to fix

Report JetsamEvent kill app event to MetricKit
 
 
Q