Not even two weeks ago, you were recommending in *this* thread to not have
swap: https://trisquel.info/forum/uruk-gnulinux-20-beta-2#comment-122235
It was a bad recommendation... but having 16 GiB of swap on a system with 4
GiB of RAM is not a good recommendation either. It is a waste o disk space.
Explaining in more details:
If the system does not have swap and runs out of RAM, the kernel kills a
process. It may happen even if the system has a huge amount of RAM, e.g.,
after running for hours a program suffering from a memory leak triggered in
some special condition. The choice of the process to kill is rather
arbitrary: the kernel may not kill the faulty process.
If the system has swap and runs out of RAM, it becomes slow. Unbearably
slow. I measured: reading data on my SSD is about 50 times slower than on my
RAM, 150 times if the data is on HDD. Nobody will have the patience to use
such a system until 16 GiB of swap are filled! Noticing that her system has
become slow, the user saves her work (she cannot in the previous situation,
without swap), maybe run 'top' (or another system monitor) to discover what
process eats up the memory resources, and chooses what program (probably that
one) to close to free some memory.
Hibernating a system is dumping the main memory onto the swap (after zipping
it).
No user will hibernate an unbearably slow system that is swapping.
Consequently, having as much swap as RAM is enough. If hibernation is never
used, swap is still needed but 1 GiB looks enough for a desktop system. For
server systems, an alert should automatically be sent to the administrator is
the system runs out of RAM. The intervention (figuring out the faulty
program and closing it) is delayed in comparison with a desktop system, with
the user sitting in front of the screen. That is why server systems had
better have more swap.