Dies ist eine alte Version des Dokuments!
Zusätzlichen Swap-Speicher in einer Datei anlegen
Datei mit 500 MByte Größe anlegen:
dd if=/dev/zero of=/var/tmp/swap bs=1M count=500
Datei als swap formatieren:
mkswap /var/tmp/swap
Swap Datei einbinden:
swapon /var/tmp/swap
Überprüfen:
free -m
swapon -s
Dokumentation
-
https://www.linux.com/news/all-about-linux-swap-space Swapping is necessary for two important reasons. First, when the system requires more memory than is physically available, the kernel swaps out less used pages and gives memory to the current application (process) that needs the memory immediately. Second, a significant number of the pages used by an application during its startup phase may only be used for initialization and then never used again. The system can swap out those pages and free the memory for other applications or even for the disk cache.