• 4am@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    21 hours ago

    Swap isn’t just used in OOM situations anymore, it’s also used for reorganization of live RAM, and anything that uses free-on-request cache RAM (ZFS comes to mind but I’m sure plenty of other stuff might be using it, like web browsers) is probably able to access large contiguous blocks because memory management is constantly reorganizing and freeing up contiguous heap.

    Turning off swap is a bad idea unless you have a server and it’s running a single application and even then it’s probably not advisable in 2026.

  • Albbi@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    22 hours ago

    How does creating a compressed block device out of my system RAM optimize my RAM usage? I’m pretty happy using my nVME drive for swap.

    • scintilla@crust.piefed.social
      link
      fedilink
      English
      arrow-up
      2
      ·
      22 hours ago

      Take this with a grain of salt as I’ve never once actually had to use swap for any of my systems running Linux.

      It is supposed to be significantly faster and the actual compression / decompression is not actually very CPU intensive. There I’d also thr benefit of reduced ware to your drive theoretically if you’re in swap constantly but ive never heard of anyone actually having an issue with that.