Created
February 23, 2017 19:26
-
-
Save asssaf/f9bef956a755e67ed742e3265765e48d to your computer and use it in GitHub Desktop.
zram swap through udev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/dev/zram0 none swap defaults 0 0 | |
/dev/zram1 none swap defaults 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KERNEL=="zram0", ATTR{comp_algorithm}="lz4", ATTR{disksize}="1024M" RUN="/usr/bin/mkswap /dev/zram0", TAG+="systemd" | |
KERNEL=="zram1", ATTR{comp_algorithm}="lz4", ATTR{disksize}="1024M" RUN="/usr/bin/mkswap /dev/zram1", TAG+="systemd" | |
#KERNEL=="zram2", SUBSYSTEM=="block", DRIVER=="", ACTION=="add", ATTR{initstate}=="0", ATTR{comp_algorithm}="lz4", ATTR{disksize}="512M", RUN+="/sbin/mkfs.ext4 -O ^has_journal -L $name $env{DEVNAME}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment