diff options
author | Diogo Ferreira <diogo@underdev.org> | 2017-05-05 11:21:15 +0100 |
---|---|---|
committer | Davide Garberi <dade.garberi@gmail.com> | 2017-12-02 18:08:43 +0100 |
commit | dbd818c2a25550ebc739548f2db32ba34af25662 (patch) | |
tree | 83e258a3691f05b0b65dfdfab78a75e60e285c5d /init | |
parent | 62040e0d575e0006c9441c829872138301335c19 (diff) |
msm8996-common: Use more conservative VM parameters
The maximum heap size for each virtual machine is 1GB. This is too big
and puts too much pressure on both the garbage collector when it tries
to perform collections in older generations. The symptoms are simple,
some applications will allocate objects that live long enough to be
promoted to older generations, escaping the efficient CMS collections.
Eventually, a stop-the-world collection will go through this large block
of memory and cause applications to pause for too long.
Additionally, the out of memory killer follows a LRU approach where it
tries to kill older applciations to make room for new ones. The problem
arises when the least recently used applications don't have large heaps
but the most recent ones do. When this happens the system halts to a
crawl while older apps and services are killed and respawned in a never
ending cycle of jankiness.
These values were obtained experimentally but actually match the
defaults for devices with >2gb of ram and xhdpi.
Change-Id: I73a92269ceac61dd4d4c1b1600f55a21534a27a0
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
Diffstat (limited to 'init')
-rw-r--r-- | init/init_msm8996.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/init/init_msm8996.cpp b/init/init_msm8996.cpp index eb8ba98..5b6c7ec 100644 --- a/init/init_msm8996.cpp +++ b/init/init_msm8996.cpp @@ -98,8 +98,8 @@ void vendor_load_properties() check_device(); property_set("dalvik.vm.heapstartsize", "8m"); - property_set("dalvik.vm.heapgrowthlimit", "384m"); - property_set("dalvik.vm.heapsize", "1024m"); + property_set("dalvik.vm.heapgrowthlimit", "256m"); + property_set("dalvik.vm.heapsize", "512m"); property_set("dalvik.vm.heaptargetutilization", "0.75"); property_set("dalvik.vm.heapminfree", heapminfree); property_set("dalvik.vm.heapmaxfree", heapmaxfree); |