From bf8f92939f1dcb82207f2515c92f5b23e395eed0 Mon Sep 17 00:00:00 2001 From: Ziyan Date: Fri, 8 Jan 2016 17:55:47 +0100 Subject: init: tune vm for zRAM References: https://source.android.com/devices/tech/config/low-ram.html https://01.org/android-ia/user-guides/android-memory-tuning-android-5.0-and-5.1 Change-Id: I8ec35dad3a65c213d1843d01957b308c3ab84a6e --- rootdir/init.tuna.rc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rootdir') diff --git a/rootdir/init.tuna.rc b/rootdir/init.tuna.rc index 7399bfc..33dd7a8 100755 --- a/rootdir/init.tuna.rc +++ b/rootdir/init.tuna.rc @@ -73,6 +73,12 @@ on fs setprop ro.crypto.fuse_sdcard true + # read only 1 page at a time + write /proc/sys/vm/page-cluster 0 + + # set swappines to 100 + write /proc/sys/vm/swappiness 100 + # change permissions for mtd device chmod 0660 /dev/mtd/mtd0 chown media media /dev/mtd/mtd0 -- cgit v1.1