Skip to content

Instantly share code, notes, and snippets.

@danilkuznetsov
Last active January 13, 2017 06:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danilkuznetsov/d26863fec3b9806f49adc8ac42561033 to your computer and use it in GitHub Desktop.
Save danilkuznetsov/d26863fec3b9806f49adc8ac42561033 to your computer and use it in GitHub Desktop.
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
Copy link
Author

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