Announcement

Collapse
No announcement yet.

Fedora 33 Looking To Use Swap On zRAM By Default With systemd's zram-generator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #31
    Originally posted by AmericanLocomotive View Post
    Now, since zram is taking up RAM to do its thing, that also means your system needs to utilize the swap space more often, correct?
    Not really, swap isn't just an extension of RAM on potentially slower storage. It's intended for swapping out pages of RAM in use that isn't really being utilized, just sitting around afaik. The vm.swappiness value can control how soon that might kick in.

    zram itself has a max uncompressed size you specify and that would be similar to a disk swap for how much can be used by it, but zram will compress it, so it'll use 2-3x less roughly, and it's only using RAM when it has something to store, so not an issue.

    Comment


    • #32
      Originally posted by FireBurn View Post
      This would be amazing! Does systemd already have a unit file that does this? I've played with zram a few times, but it's a bit of a faf and needs to be done each time the system boots, so having something that just does it automatically would save so much time
      No unit required. From the Fedora Changes SwapOnZRAM wiki,
      • dnf install zram-generator
      • cp /usr/share/doc/zram-generator/zram-generator.conf.example /etc/systemd/zram-generator.conf
      • Edit the configuration
      • Reboot
      Systemd will automatically configure zram.
      Last edited by finalzone; 08 June 2020, 07:45 PM.

      Comment


      • #33
        Originally posted by finalzone View Post

        No unit required. From the Fedora Changes SwapOnZRAM wiki,
        • dnf install zram-generator
        • cp /usr/share/doc/zram-generator/zram-generator.conf.example /etc/systemd/zram-generator.conf
        • Edit the configuration
        • Reboot
        Systemd will automatically configure zram.
        That's if you're running Fedora, I'm not

        Edit: But it is available in Gentoo https://packages.gentoo.org/packages...lock/zram-init

        Comment


        • #34
          But what's the advantages over zswap which you simply activate in the kernel?

          zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=10 zswap.zpool=z3fold

          Comment

          Working...
          X