Posts tagged swap file
Server Memory Setup – To Swap or Not to Swap
Oct 28th
For a while I turned off the swap file on my virtual machine. It worked, but then I began to use more php pages and the server began acting funny, especially with database queries. After a day or two of the system crashing I turned on a swap file and the system stability came back real quick. The virtual machine has 1024 megs of ram and 2048 megs of swap and the system appears to be managing memory much better. Review your system performance and status with the top binary.
As for the host, I turned the swap partition back on, but I dont think it is needed. I will try server configurations on my days off this week.
Create a Swap File – Separate Partition is not Needed
Oct 28th
Debian, and Ubuntu have an incredibly convenient package that creates a swap file in any directory. Install with:
sudo apt-get install dphys-swapfile
The installation process with automatically create the swap file. Then just enable it with:
sudo swapon -a
Viola, a fully function swap file that is not on a separate partition.
