Skip to content
Snippets Groups Projects

Remove zram size limit and disable zswap when using zram

Merged Evangelos Foutras requested to merge zram-generator-fixes into master
1 file
+ 9
0
Compare changes
  • Side-by-side
  • Inline
  • When both zswap and zram are active, zswap sits in front of zram and
    treats it as a backing store. We just want to use zram and not zswap
    disguising itself as such; disable the latter so we can enjoy useful
    zramctl statistics.
    
    Implemented as tmpfiles.d/zram.conf which disables zswap at runtime.
@@ -144,6 +144,15 @@
- restart systemd-zram-setup@zram0
when: enable_zram_swap
- name: disable zswap to prevent conflict with zram
copy: content="w- /sys/module/zswap/parameters/enabled - - - - N" dest=/etc/tmpfiles.d/zram.conf
register: zramtmpfiles
when: enable_zram_swap
- name: use tmpfiles.d/zram.conf
command: systemd-tmpfiles --create
when: zramtmpfiles.changed
- name: start systemd-oomd
service: name=systemd-oomd state=started enabled=yes
Loading