If you want to hibernate a system, you need swap because hibernating is dumping the main memory onto the swap (after zipping it). That is why those who hibernate their systems are often recommended to choose at least as much swap as RAM.

A system that never hibernates had better have a (small) swap partition than no swap at all. With no swap, the kernel kills a process as soon as the system runs out of RAM. It may happen even if the system has a huge amount of RAM, e.g., because of a memory leak triggered in some special conditions. The kernel's choice of the process to kill is rather arbitrary and it may not kill the faulty process.

With 1 GB of swap (for instance), the user of a desktop system will have time to notice that their system has become slow, to save their work, and to choose what application(s) to close to free some RAM. For server systems, the intervention (after an alert sent by a monitoring system) may take longer and such systems had better have more swap.

Reply via email to