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
This commit is contained in:
Wei Wang
2017-05-17 15:27:32 -07:00
parent 922ee28abc
commit 88f424e979
2 changed files with 5 additions and 1 deletions

View File

@@ -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

View File

@@ -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