Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 665e91e1 authored by Misha Wagner's avatar Misha Wagner
Browse files

Use Process.getRss instead of mProfile.getLastRss in CacheOomRanker.

RSS values are cached in ProcessStateRecord, and repopulated when they
are >10s old.

mProfile.getLastRss values can be 15s-2h stale, which is why we're using
this implementation. My understanding is that the best solution would be
to populate mProfile.getLastRss more often - but it is currently
populated alongside PSS, which is more expensive to calculate.
Therefore, rather than the more complex change of splitting up PSS & RSS
collection, we opt for this simple (if not optimal) approach as
CacheOomRanker is still experimental. Upon successful launch, we can
revisit this.

When logging the duration of CacheOomRanker calculations, we saw no
significant increase in computation time with this change. If we turn
off caching RSS values, we see a 10x increase in computation time.

Test: atest CacheOomRankerTest
Bug: 196031723
Merged-In: I8e80db2aab338df07f07842131a9d4b55bebd054
Change-Id: I8e80db2aab338df07f07842131a9d4b55bebd054
(cherry picked from commit 8bd226e3)
parent 7d611c75
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment