• ominous ocelot@leminal.space
    link
    fedilink
    arrow-up
    2
    ·
    8 个月前

    What’s the use case over RAM or disk swap? It’s compressed but faster than SSD? Hmm. That could help in distinct use cases…

    • turdas@suppo.fi
      link
      fedilink
      arrow-up
      6
      ·
      8 个月前

      Yes, it’s basically faster than disk swap but uses some CPU cycles. The compression algorithms involved are very fast on modern CPUs so in some sense it’s “free RAM”.

      I set mine to almost 1:1 my physical RAM, because the way it works is that the zram disk size (62.6G there) is the amount of uncompressed data allowed on it, and the compression on real-world data is almost always at least 50% – so if the zram device fills up, it’ll be using something like 32G of physical memory. I’m yet to hit real-world usecases that would have tested these limits though, and the defaults are much more conservative.