• towerful@programming.dev
      link
      fedilink
      arrow-up
      4
      ·
      2 months ago

      What I’d recommend is setting up a few testing systems with 2-3GB of swap or more, and monitoring what happens over the course of a week or so under varying (memory) load conditions. As long as you haven’t encountered severe memory starvation during that week – in which case the test will not have been very useful – you will probably end up with some number of MB of swap occupied.

      And

      [… On Linux Kernel > 4.0] having a swap size of a few GB keeps your options open on modern kernels.

      And finally

      For laptop/desktop users who want to hibernate to swap, this also needs to be taken into account – in this case your swap file should be at least your physical RAM size.