News for hackers. Stuff that matters.
Re:In defence of swap: common misconceptions by colejohnson66 on Monday June 08, 2020 @10:43PM (#23463114)
But if I upgrade to 32 GB or RAM, would I even need the swap? I guess my question is: why is swap not dynamic like pagefile.sys on Windows? The pagefile grows and shrinks as it’s needed. But a swap partition doesn’t; it’s size is set at creation.
Re:In defence of swap: common misconceptions by bb88 on Monday June 08, 2020 @11:20PM (#23463331)
What's your workload like, do you run a lot of heavy servers for development? Or do you mostly do browsing?

A growing/shrinking swap file doesn't really add anything, especially if you're thinking a 1:1 relationship with memory and swap. To me it seems like 16GB of HD space isn't that big a deal.

You can also play around with swap performance if you want temporarily.

https://linuxize.com/post/create-a-linux-swap-file/

Yes, it's going to be slower since you're using a file in a filesystem rather than using a dedicated partition, but it would give you a way to test it out. Some workloads will do better since the unused pages will get sent to disk.

Re:In defence of swap: common misconceptions by SomeoneFromCA on Monday June 08, 2020 @11:12PM (#23463271)
Yo do not need a partition, you can use a file.
Re:In defence of swap: common misconceptions by dTal on Tuesday June 09, 2020 @05:03AM (#23464985)
True. It's still a fixed size.

(It's also slower. The reason we use partitions is to avoid invoking a whole heap of filesystem code every time we want to access some memory.)