Thursday, November 4, 2010

Autogenerate and Use a Swap File

Package: dphys-swapfile from http://packages.debian.org/squeeze/dphys-swapfile . This init.d script exists so one does not need to have a fixed size swap partition. Instead install without swap partition and then run this, with file size (re-)computed automatically to fit the current RAM size. 
After the package has been installed whenever you boot you'll have /var/swap created. You can verify this yourself with the swapon command :
 /sbin/swapon  -s
Filename                Type        Size          Used    Priority
/var/swap                  file        2097144    0           -1
See : http://www.debian-administration.org/articles/550

No comments:

Post a Comment