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

  • #11
    canp't edit my previous post from mobile, here's why:

    Zswap† is a similar idea, but with a totally different implementation. It is swap specific, uses a RAM cache, and requires a conventional swap partition existing already. It might be true certain workloads are better suited for using zswap. But swap-on-zram depends only on volatile storage. This is simpler and it's more secure. Whereas zswap "spills over" into swap-on-drive and will leak user data if that swap device isn't encrypted. Some workloads may do better with zswap, and it's a valid future feature for a new generator, or possibly extend zram-generator to support it via the configuration file. Maybe the generator could favor zswap when swap-on-drive already exists; and fallback to swap-on-zram?

    Comment


    • #12
      Originally posted by AmericanLocomotive View Post
      I guess I don't understand - if you have enough memory to use a RAM-drive for swap, couldn't you just disable swap and keep everything in memory anyways?
      Aside from the compression, I was told that Linux's memory defragmentation requires that some swap exist to function properly and my experience has supported that.

      When I was running a pure RAM setup with 16GiB of RAM, it was as if I had a memory leak over the course of a month or two, which seemed to be spread more or less evenly across all my long-running applications. Enabling some zram-backed swap fixed the problem.

      Comment


      • #13
        Originally posted by kokoko3k View Post
        But swap-on-zram depends only on volatile storage.
        zram can use disk swap as backing storage. I don't see from your description how zswap is superior, it kinda of states the opposite?

        Comment


        • #14
          Originally posted by skeevy420 View Post
          I would rather have my emergency in case shit happens swap there versus on a disk.
          i would rather swap to optane than waste memory on zram. and if you suffer from swapping, the most stupid thing you could do is reduce available ram
          Last edited by pal666; 06 June 2020, 10:05 PM.

          Comment


          • #15
            Swapping is usually slower than compression speeds. That's why zram and zcache benefits. Obviously there is a cut off point when using too much ram increases the swapping due to lack of ram for running apps.

            Optane might be different as it is very fast. It's also very expensive and most users don't have one.

            Comment


            • #16
              Originally posted by kokoko3k View Post
              And why not zswap instead !?
              I think is far superior!
              zswap is the same concept, but in the hard-drive instead of been in memory ram( ZRam is compression on Ram memory...AIX does this for maybe decades.. )

              Comment


              • #17
                Originally posted by polarathene View Post
                zram can use disk swap as backing storage. I don't see from your description how zswap is superior, it kinda of states the opposite?
                If Zram can use disk as swap storage, then its not Zram, but instead Zswap..

                This feature come in the linux kernel is a driver module that you load on boot, I don't even know why Fedore is planning in feeding the monster( systemd ), with this..

                Comment


                • #18
                  Originally posted by tuxd3v View Post
                  zswap is the same concept, but in the hard-drive instead of been in memory ram( ZRam is compression on Ram memory...AIX does this for maybe decades.. )
                  AFAIK zswap is a compressed memory area for swapped memory pages. It uses normal disk swap as backing store, however anything that is written to disk is uncompressed.

                  Comment


                  • #19
                    Originally posted by AmericanLocomotive View Post
                    I guess I don't understand - if you have enough memory to use a RAM-drive for swap, couldn't you just disable swap and keep everything in memory anyways?
                    This system compresses the RAM-drive swap. In many cases this allows it to reduce the RAM-drive size by A LOT.

                    Comment


                    • #20
                      Originally posted by tuxd3v View Post
                      zswap is the same concept, but in the hard-drive instead of been in memory ram( ZRam is compression on Ram memory...AIX does this for maybe decades.. )
                      zswap is still swapping to RAM and compressing it but is using a dedicated system with less overhead than "make a block device in RAM, swap to it and compress it" like zram does.

                      It requires an actual swap device but that's only for things that overflow the RAM cache, and stuff on disk swap space is not compressed.

                      Comment

                      Working...
                      X