summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Wang <wvw@google.com>2017-05-17 15:27:32 -0700
committerWei Wang <wvw@google.com>2017-05-17 16:19:32 -0700
commit88f424e979e885650f3e7e5994f49cd9f47235c8 (patch)
tree205e3c16f6b11e1518e0e5c5f9292a564ba90569
parent922ee28abc59a641d3753bcc5d54817d36a232fb (diff)
downloadwahoo-88f424e979e885650f3e7e5994f49cd9f47235c8.tar.gz
wahoo: tune zram performance
-Switch to LZ4 for better overall performance -Set max_comp_streams to num of cores since upstream also moves this to percpu. -Set page-cluster to 0 as the incremental cost of reading 1 page at a time is negligible for zram Bug: 38249616 Test: boot and run zram-perf showing better performance Change-Id: I0b92b246d773db85aa03d033b2cecee54347cbd1
-rw-r--r--fstab.hardware2
-rw-r--r--init.hardware.rc4
2 files changed, 5 insertions, 1 deletions
diff --git a/fstab.hardware b/fstab.hardware
index 027b7886..413d1fa3 100644
--- a/fstab.hardware
+++ b/fstab.hardware
@@ -7,4 +7,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
+/dev/block/zram0 none swap defaults zramsize=536870912,max_comp_streams=8
diff --git a/init.hardware.rc b/init.hardware.rc
index c0330436..9239a4a8 100644
--- a/init.hardware.rc
+++ b/init.hardware.rc
@@ -143,6 +143,10 @@ on init
# b/37682684 Enable suspend clock reporting
write /sys/kernel/debug/clk/debug_suspend 1
+ # ZRAM setup
+ write /sys/block/zram0/comp_algorithm lz4
+ write /proc/sys/vm/page-cluster 0
+
on fs
wait /dev/block/platform/soc/${ro.boot.bootdevice}
symlink /dev/block/platform/soc/${ro.boot.bootdevice} /dev/block/bootdevice