Re:In defence of swap: common misconceptions
by colejohnson66 on Monday June 08, 2020 @06:19PM
(#23461449)
I’m still confused on swap. What’s the practical difference (besides speed) between 16 GB or RAM and 16 GB of swap versus 32 GB of RAM and 0 swap?
[ Parent
| on HN ]
Re:In defence of swap: common misconceptions
by eurekin on Tuesday June 09, 2020 @03:08AM
(#23464442)
I'm in the same boat with that. What makes 16GB RAM + 16GB swap acceptable, when 32GB of just RAM is the same size and faster? Why, 32GB of RAM only needs extra swap?
Re:In defence of swap: common misconceptions
by NikolaeVarius on Monday June 08, 2020 @09:36PM
(#23462742)
16 GB of SSD space is cheaper
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.
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.