Operation Manual

System with lots of swap (several GB)
It is better to not have an application that is out of control and swapping excessively
in this case. If you use such application, the system will need many hours to recover.
In the process, it is likely that other processes get timeouts and faults, leaving the
system in an undened state, even after killing the faulty process. In this case, do
a hard machine reboot and try to get it running again. Lots of swap is only useful
if you have an application that relies on this feature. Such applications (like
databases or graphics manipulation programs) often have an option to directly use
hard disk space for their needs. It is advisable to use this option instead of using
lots of swap space.
If your system is not out of control, but needs more swap after some time, it is possible
to extend the swap space online. If you prepared a partition for swap space, just add
this partition with YaST. If you do not have a partition available, you may also just use
a swap le to extend the swap. Swap les are generally slower than partitions, but
compared to physical ram, both are extremely slow so the actual difference is negligible.
Procedure 2.1
Adding a Swap File Manually
To add a swap le in the running system, proceed as follows:
1
Create an empty le in your system. For example, if you want to add a swap le
with 128 MB swap at /var/lib/swap/swapfile, use the commands:
mkdir -p /var/lib/swap
dd if=/dev/zero of=/var/lib/swap/swapfile bs=1M count=128
2
Initialize this swap le with the command
mkswap /var/lib/swap/swapfile
3
Activate the swap with the command
swapon /var/lib/swap/swapfile
To disable this swap le, use the command
swapoff /var/lib/swap/swapfile
4
Check the current available swap spaces with the command
cat /proc/swaps
46 Reference