Swap partition vs. file

I am going to install Manjaro to a real computer for the first time. (So far I have only installed Linux to virtual machines.)

I have read up on swap partition vs. file in general terms.

But which should I use given the following:

  • The system will have 16 GB of RAM and a single SSD (to start with).
  • That it’s Manjaro (if there is any consideration peculiar to Manjaro as opposed to Linux in general).
  • I want this to be the best learning experience. (Meaning if the use of one will give me a greater insight into how the thing works, I may want that even if it takes more work.)

considering you’ve got 16GB, you can afford to have a system somewhat less reliant on swap space, however there is no scenario where you can forgo swap-space in general linux or any OS.

manjaro on my personal laptop was i think the first time i tried a swap file and i see no reason why people should meddle with swap partitions anymore. beside the obvious advantage of resizable swap size when it is simply a file on a SSD (on HDDs there is a somewhat of a performance disadvantage to a swap file, when there could be no continuous physical space on disk leading to a fragmented swap file).

since you want to learn, i suggest you concentrate mostly on arch-wiki if you are meddling with manjaro, it is both relevant and concise as much as it need to be while covering all nuts and bolts that needs to be tweaked.

for this you can refer;

1 Like


consider zram. There’s a nice tool zram-generator.

sudo pacman -S --noconfirm zram-generator

configuring the tool … go to the arch wiki and search for zram

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.