Change zram swap size and swappiness

This CL increase zram swap size from 512M to 1024M of p17.
It also increase swappiness from 60 to 100.
It has more benefit for overall system performance.
Detail is in the bug.

Bug: 117522738
Test: confirmed zram size and swappiness change manually
Change-Id: If75e47962915f6d4957e5fa9337e40dd6878fa65
Signed-off-by: Minchan Kim <>
diff --git a/fstab.hardware b/fstab.hardware
index d2fc516..472c491 100644
--- a/fstab.hardware
+++ b/fstab.hardware
@@ -6,4 +6,4 @@
 /dev/block/platform/soc/1da4000.ufshc/by-name/misc         /misc              emmc        defaults                                              defaults
 /dev/block/platform/soc/1da4000.ufshc/by-name/modem        /firmware          vfat        ro,shortname=lower,uid=1000,gid=1000,dmask=227,fmask=337,context=u:object_r:firmware_file:s0   wait,slotselect
 /devices/soc/a800000.ssusb/a800000.dwc3*                   auto               vfat        defaults                                              voldmanaged=usb:auto
-/dev/block/zram0                                           none               swap        defaults                                              zramsize=536870912,max_comp_streams=8
+/dev/block/zram0                                           none               swap        defaults                                              zramsize=1073741824,max_comp_streams=8
diff --git a/init.hardware.rc b/init.hardware.rc
index 11863ae..ba4b0d7 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -607,6 +607,7 @@
 # we don't want to run swapon_all at that time.
 on sys-boot-completed-set && property:persist.sys.zram_enabled=1
     swapon_all /vendor/etc/fstab.${ro.hardware}
+    write /proc/sys/vm/swappiness 100
 on property:init.svc.vendor.per_mgr=running
     start vendor.per_proxy