From 372e5474d4b7832901d52c274e9ce26e7da66922 Mon Sep 17 00:00:00 2001 From: Vitalii Tomkiv Date: Wed, 18 May 2016 17:40:41 -0700 Subject: [PATCH] Set zygote process priority to -20 to speed up VM startup time. Tests for Nexus9 device shows 450ms boot time speedup, 180ms for Nexus 5X. Bug: 28866384 Change-Id: Icefd130d4bfe5538dae5b9518250807351b0789e --- rootdir/init.zygote32.rc | 1 + rootdir/init.zygote32_64.rc | 2 ++ rootdir/init.zygote64.rc | 1 + rootdir/init.zygote64_32.rc | 2 ++ 4 files changed, 6 insertions(+) diff --git a/rootdir/init.zygote32.rc b/rootdir/init.zygote32.rc index 0ca38b9cd..4b76383c9 100644 --- a/rootdir/init.zygote32.rc +++ b/rootdir/init.zygote32.rc @@ -1,5 +1,6 @@ service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server class main + priority -20 socket zygote stream 660 root system onrestart write /sys/android_power/request_state wake onrestart write /sys/power/state on diff --git a/rootdir/init.zygote32_64.rc b/rootdir/init.zygote32_64.rc index 1646c0f7e..2efd8e226 100644 --- a/rootdir/init.zygote32_64.rc +++ b/rootdir/init.zygote32_64.rc @@ -1,5 +1,6 @@ service zygote /system/bin/app_process32 -Xzygote /system/bin --zygote --start-system-server --socket-name=zygote class main + priority -20 socket zygote stream 660 root system onrestart write /sys/android_power/request_state wake onrestart write /sys/power/state on @@ -9,6 +10,7 @@ service zygote /system/bin/app_process32 -Xzygote /system/bin --zygote --start-s service zygote_secondary /system/bin/app_process64 -Xzygote /system/bin --zygote --socket-name=zygote_secondary class main + priority -20 socket zygote_secondary stream 660 root system onrestart restart zygote writepid /dev/cpuset/foreground/tasks /sys/fs/cgroup/stune/foreground/tasks diff --git a/rootdir/init.zygote64.rc b/rootdir/init.zygote64.rc index b477c8ef2..342a561b7 100644 --- a/rootdir/init.zygote64.rc +++ b/rootdir/init.zygote64.rc @@ -1,5 +1,6 @@ service zygote /system/bin/app_process64 -Xzygote /system/bin --zygote --start-system-server class main + priority -20 socket zygote stream 660 root system onrestart write /sys/android_power/request_state wake onrestart write /sys/power/state on diff --git a/rootdir/init.zygote64_32.rc b/rootdir/init.zygote64_32.rc index 633a98108..b3ac7b064 100644 --- a/rootdir/init.zygote64_32.rc +++ b/rootdir/init.zygote64_32.rc @@ -1,5 +1,6 @@ service zygote /system/bin/app_process64 -Xzygote /system/bin --zygote --start-system-server --socket-name=zygote class main + priority -20 socket zygote stream 660 root system onrestart write /sys/android_power/request_state wake onrestart write /sys/power/state on @@ -9,6 +10,7 @@ service zygote /system/bin/app_process64 -Xzygote /system/bin --zygote --start-s service zygote_secondary /system/bin/app_process32 -Xzygote /system/bin --zygote --socket-name=zygote_secondary class main + priority -20 socket zygote_secondary stream 660 root system onrestart restart zygote writepid /dev/cpuset/foreground/tasks /sys/fs/cgroup/stune/foreground/tasks