Hey!
I bought more ram for my pc and i am confused about how (and if) i should increase the swap on my system. I found a ton of different guides but am not sure which one to pick.
I upgraded from 16GB to 32GB of ram. Does the size of the swap file need to match the physical ram even if i am not using hybernate (i did not pick that option on startup).
Would be super cool if someone could link me a guide.
Thank you!
I have only 8gb RAM (some shared for integrated graphics) on my laptop and swap is only used when I run a VM with 3gb. Otherwise, I didn’t see swap is used, even when I open a lot of apps, like browsers, code editors, GIMP, Krita and KDEnlive (I’ve never checked if swap is used on video rendering… <— TODO).
My guess is that you don’t need more swap, Linux is not RAM eater as Windows.
If I were you, I would see if the current swap partition is sufficient for your use first.
Only if it is not, would I start to investigate https://wiki.archlinux.org/title/Swap
As an alternative to creating an entire partition, a swap file offers the ability to vary its size on-the-fly, and is more easily removed altogether. This may be especially desirable if disk space is at a premium (e.g. a modestly-sized SSD). https://wiki.archlinux.org/title/Swap#Swap_file
I don’t use it myself but as far as I know: Arch wiki
just by itself. Perhaps I misunderstood what you wrote.
As far as i know, the procedure for resizing the swap is first to disable it (swapoff) and then use dd to resize it. There are however, if I remember correctly, some pieces of software to manage it dynamically.
Edit:
This is what I remembered that I had come across before for managing the size of the swapfile dynamically:
Whether you need swap or not depends or course what you are doing with the machine.
I also have 32GB RAM and run several 8GB RAM VirtualBox virtual machines, each one is running EndeavourOS or Arch, all at the same time. So far I have never needed swap on this 32GB RAM machine, and also never in the 8GB RAM virtual machines.
So I don’t have any swap partition nor swap file.
So far so good.
What kind of programs are you planning to run on the machine?