Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 6
    The advice to have 2x swap size was for 2 decades ago and was obsolete long ago, just don't do that and use zram instead Commented Sep 4, 2022 at 12:32
  • 2
    swap size > RAM is still useful on systems that will be suspended to disk - e.g. laptops. A machine can't suspend if there's nowhere to store the RAM contents, and Linux uses swap space for that. Commented Sep 5, 2022 at 0:52
  • Use bs=1M and set count to the number of megabytes you want the swapfile to be Commented Sep 5, 2022 at 6:27