Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
quick enable auto start zram.service in Fedora 23 (dirty hack)
### how to enable on boot zram.service in Fedora 23 and later ?
just add [Install] section in zram.service.
example unit file above.
command for edit sudo systemctl edit --full zram.service
p.s.
if you have 2 GB of RAM or more, you may want to change the value of MAX_RAM_ON in /usr/libexec/anaconda/zramswapon
zram.service file:
[Unit]
Description=Service enabling compressing RAM with zRam
ConditionKernelCommandLine=!inst.zram=off
ConditionKernelCommandLine=!inst.zram=0
[Service]
Type=oneshot
ExecStart=/usr/libexec/anaconda/zramswapon
ExecStop=/usr/libexec/anaconda/zramswapoff
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
@danilkuznetsov

This comment has been minimized.

Copy link
Owner Author

@danilkuznetsov danilkuznetsov commented Jul 19, 2016

how to enable on boot zram.service in Fedora 23 ?
just add [Install] section in zram.service.
example unit file above.
command for edit sudo systemctl edit --full zram.service
p.s.
if you have 2 GB of RAM or more, you may want to change the value of MAX_RAM_ON in /usr/libexec/anaconda/zramswapon

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