Linuxhotel Wiki

Wie ging das nochmal?




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


free -m
swapon -s


  • 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.
admin_grundlagen/swap.1485876847.txt.gz · Zuletzt geändert: 2017/01/31 15:34 von ingo_wichmann