However, if for whatever reason, that’s not possible, 8GB, with say another 8GB in swap should be fine.
The reason why it’s not optimal to use an SSD for SWAP is because an SSD has a limited number of read/writes for it’s lifetime, which should be fine for almost everyone. But SWAP puts extra strain on the drive because it’s extra reads & writes.
But you can adjust the swappiness to be less active, which is better for an SSD.
I have two laptops, one is about 2014 era and the other 2018. They both have reasonable specs for their age and both have 4gb ram. I also created an equivilante size swap partition on both, as the norm when installing. I have yet to see either one of these machines use the swap. I also don’t allow them to suspend or hibernate. There either on or off.
The fear mongering about the SSD lifespan is not justified, especially nowadays. It is true that a SWAP file will read/write more on the SSD, but you’ll not kill your SSD by having SWAP on it. Using a web browser intensively would not be better/worst than having a SWAP file. For example Windows defaults to having a SWAP file (it is called the Page File), Windows does not kill SSD. They are made to have data written to them, A LOT of data (unless you got a cheap no name Chinese one from 10 years ago).
//EDIT: you can just check the SMART properties from the SSD, and see how it doesn’t reduce its lifespan after a month/year of usage with SWAP on it. If you see the lifespan reducing, you can still ask if it seems normal or not later on the forum. Don’t be afraid, unless you do specific idiotic things intended to destroy a SSD, you’ll not destroy a SSD.
Yes, it’s just gonna contribute to the wear level of your SSD everytime the swap is used.
Certainly the 16GB version. That’s my current amount of RAM and sometimes my workload passes it and the swap is used. Of course we might have a different workload but eventually the 16GB will last you a longer time, especially if the laptop you choose only has soldered RAM with no expansion slot.
Use zram which creates a compressed portion of RAM.
If that’s not enough you can set up zswap which uses a copressed swap space. But it’s a bit more complicated.
Both things can be found in the Arch Wiki.
I have a laptop with 8GB RAM and I did have sometimes problem, when system was out of RAM (system was frozen).
It all ended when I decided to move to swap file using swapspace (AUR).
I also added zramswap, but didn’t notice any difference. However, both swapspace (needs to be configured after installation) and zramswap work fine - all freezing problems went away. Whenever I need more RAM, the system automatically and dynamically adds more swap file.
I recall also tweaking some swap settings. Don’t remember what exactly, because this was years ago.