Skip to content

Instantly share code, notes, and snippets.

Created June 21, 2016 02:41
What would you like to do?
ZRAM config for Raspberry Pi 3
# Raspberry Pi ZRAM script
# Tuned for quad core, 1 GB RAM models
# put me in /etc/init.d/ and make me executable
# then run "sudo update-rc.d defaults"
modprobe zram
echo 3 >/sys/devices/virtual/block/zram0/max_comp_streams
echo lz4 >/sys/devices/virtual/block/zram0/comp_algorithm
echo 268435456 >/sys/devices/virtual/block/zram0/mem_limit
echo 536870912 >/sys/devices/virtual/block/zram0/disksize
mkswap /dev/zram0
swapon -p 0 /dev/zram0
sysctl vm.swappiness=70
Copy link

bcutter commented Mar 22, 2019

When "sudo update-rc.d defaults" I get:

insserv: warning: script '' missing LSB tags and overrides
insserv: There is a loop between service watchdog and if stopped
insserv:  loop involving service at depth 2
insserv:  loop involving service watchdog at depth 1
insserv: Stopping depends on watchdog and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header

So... what now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment