Rule of thumb: allocate 2x swap to available RAM, at a minimum. So, since you have 1GB RAM, create a swap space or swap file (use the swapon command to do this) of 2GB, at a minimum. You can increase this later if you need.
Rule of thumb: allocate 2x swap to available RAM, at a minimum. So, since you have 1GB RAM, create a swap space or swap file (use the swapon command to do this) of 2GB, at a minimum. You can increase this later if you need.
Thanks, Rubberman. I have learned that I cannot create swap space because I'm using a godaddy virtual dedicated server. http://support.godaddy.com/groups/web-hosting/forum/topic/am-i-allowed-to-setup-swap-disk-on-vps/
You could recompile linux-utils and then you'd be able to create swap spaces on disc :)
Regards
Well, even if you cannot create a swap partition, you should be able to create a swap file. As reader marc suggested, install/compile the linux-utils package if you need and do not have access to the swapon command in your VM. All you should need is disc space (real or virtual).
If you would like to make a swap parse file you can follow these steps, in this case the swap file is being stored as /root/swapme. (Run all of these commands as root)
# Make a 1GB empty File
dd if=/dev/zero of=/root/swapme bs=1M count=1024
# format the file as swap
mkswap /root/swapme
#To mount it immediately, you can use
swapon /root/swapme
#To make sure it is always mounted on boot you need to add the following line to /etc/fstab
/root/swapme swap swap deafaults 0 0
Call it whatever you want, swapme was a fast name that I used to test the steps.
It appears linux-utils is the same as util-linux, correct?
@mfillpot - thanks, swapon is what I tried at first and it failed. I searched about the error and hit that godaddy support thread that I posted. I still tried changing fstab and rebooting, but doesn't appear to have done anything.
The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.
Join / Linux Training / Board