• Infiltrated_ad8271@kbin.social
    link
    fedilink
    arrow-up
    25
    arrow-down
    2
    ·
    1 year ago
    • Hibernation into swap files backed by Btrfs are now supported.

    So, with btrfs on ssd, is there any use case for a swap partition?

      • bdonvrA
        link
        fedilink
        arrow-up
        6
        ·
        1 year ago

        I think what they mean is that you can just make a swap FILE instead, which you can grow and shrink as needed. No need to mess with partitioning.

        • Infiltrated_ad8271@kbin.social
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          Yep. In fact my comment seemed so clear to me that I assumed it was some kind of joke, but looking at the votes, maybe swapfiles aren’t as well known as I thought.

            • wmassingham@lemmy.world
              link
              fedilink
              arrow-up
              4
              arrow-down
              1
              ·
              edit-2
              1 year ago

              I’m not sure what that post is meant to show, if swap isn’t “disk RAM”. That post even concludes:

              Swap […] provides another, slower source of memory […]

              • lemmyvore@feddit.nl
                link
                fedilink
                English
                arrow-up
                1
                arrow-down
                2
                ·
                1 year ago

                Um, you really need to read the entire phrase and not pick out only what you want from it. 😃

                Swap can make a system slower to OOM kill, since it provides another, slower source of memory to thrash on in out of memory situations

                It means that if you try to use it as a source of memory, when you run out of actual RAM it will make your system almost completely unresponsive due to disk thrash, instead of allowing the kernel to just kill the process that’s eating your RAM. So you’ll just end up hard-booting system.

                • wmassingham@lemmy.world
                  link
                  fedilink
                  arrow-up
                  1
                  arrow-down
                  1
                  ·
                  1 year ago

                  Yes, and that’s a good thing if you don’t want it to start killing processes. You have that extra time/space to deal with the out-of-memory condition yourself.

                  Or you can ignore that condition and continue using the system in a degraded state, with swap as “disk RAM”.

                  • lemmyvore@feddit.nl
                    link
                    fedilink
                    English
                    arrow-up
                    2
                    ·
                    1 year ago

                    Like I said, the system will be almost completely unresponsive due to disk access being several orders of magnitude lower than RAM and allocation thrashing… you won’t be able to do much, the mouse, keyboard and display will react extremely slowly. There may be situations where you’d prefer this to an OOM kill, for example if you’re running a test or experiment where you’d rather have it finish even if it takes a very long time rather than lose the data. But if you’re a regular desktop user or server admin you’ll probably just reboot.

    • rotopenguin@infosec.pub
      link
      fedilink
      English
      arrow-up
      5
      ·
      1 year ago

      Do you mean that you don’t have to find the LBA of the extents of your swap file, and put that into a kernel argument anymore?

      Cuz that is a nasty, skanky hack.

      • Infiltrated_ad8271@kbin.social
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        1 year ago

        I’ve never heard of that, it’s beyond me. So it’s an increased risk when tweaking the kernel? As an average home user it’s all right?