Permanently Deleted

  • asante [comrade/them]
    ·
    5 months ago

    i find zram very useful (especially for fast temp editing of files) but that would only really work if you had enough RAM

    • unperson [he/him]
      ·
      5 months ago

      zswap has the same purpose than zram but a better design: it sends to disk the pages that cannot be compressed, and when it gets full it writes them back least recently used first. zram on the other hand keeps uncompressible pages around, and when it gets full all new pages go to disk and it makes the situation worse when you're low on RAM.

      • asante [comrade/them]
        ·
        5 months ago

        woah thanks! i always thought zram was a better solution than zswap but i'll give zswap a try when i get time.

        am i right that you can create zswap block devices and mount them like with zram? (eg. mounting /var/tmp)

        • unperson [he/him]
          ·
          edit-2
          5 months ago

          am i right that you can create zswap block devices and mount them like with zram? (eg. mounting /var/tmp)

          zswap is a "front swap", it needs a backing swap to function that's crucial to the design. It automtically goes in front of all the swaps you have enabled.

          You could probably put the backing swap on a loop device on a tmpfs, but I don't know how it will handle the loopback. It's a better idea to put it on disk. It can be a slow or write-limited disk, it will not get used much. You definitely should not use zram and zswap at the same time.

          • asante [comrade/them]
            ·
            5 months ago

            damn. when i do try out zswap i'll try and do this. but i do a lot of compiling and i prefer not to do all those reads and writes on my hard drive, so i will be sticking with zram for now.

            thanks for the advice! it was hard for me to understand the differences at first when i first started looking at them so your comments are helpful.