• SleveMcDichael@programming.dev
    link
    fedilink
    English
    arrow-up
    25
    ·
    edit-2
    21 hours ago

    Please, for the love of who ever you hold in high esteem, use swap. See: https://chrisdown.name/2018/01/02/in-defence-of-swap.html Now I don’t really like the whole “Heres an article from some rando to prove my point” thing, but anecdotally, the article does line up with my experience (with 32 gigs of system memory). Namely, when I went without swap I experienced frequent system lock-ups, when I added swap on zram, lock ups still happened but less frequently, and when I eventually changed swap on zram to disk swap on the recommendation of this article lock ups never happened again.

    • kopasz7@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      16
      ·
      22 hours ago

      To add some nuance to this, do not use ZRAM in combination with swap. There’s ZSWAP for that which does what you would expect, without clogging up your RAM and gracefully handling a backing device. (ZRAM is just another block device for the kernel, so you will get LRU inversion if it fills up and you have another layer of swap on disk. Meaning your cold pages will be needlessly stuck in zram.)