Add app compaction throttling.
Implement configurable flags that 1. Filters full app compaction by the anon RSS use of a process, i.e. do not compact processes that are using an amount of memory lower than the flag value. By default the flag is 12000kB, which from experimental data indicates we get 85% of the compaction gains with 50% of the number of compactions. The filter can be disabled entirely by setting a value of 0. The default will be later tuned with further experiments. 2. Filters full compaction by the delta in RSS usage since the effect of compaction last time the process was (fully) compacted. This is to try and not compact if we think that there are diminishing returns. The default is 8000kB, which from experimental data suggests we get 90% of the compaction gains with 50% of the compaction events. The filter can be disabled by setting a value of 0. The default will be later tuned with further experiments. 3. Filters all types of compaction for processes in certain procstate, by default PROCESS_STATE_BROADCAST_RECEIVER. The filter can be disabled by setting the empty string and the default will be tuned with further experiments. BUG: 128427978 Test: atest FrameworksMockingServicesTests:AppCompactorTest Change-Id: I71fffc52a232cd5608742d9f36965a4de6494b56
Loading
Please register or sign in to comment