What the swap size should be in a VPS. I’ve read that in Linux machine the swap should have the same size as the amount of physical memory the machine is installed with? Dose this apply to a VPS, should a VPS having 512Mb dedicated Ram have 512Mb swap or smaller?
Generally the swap size is double the existing physical memory the machine is installed with. If it’s installed with 1 GB, the swap size is 2 GB. Swap should always be at least equal to ram, standard practice is double the amount of ram in swap. Granted swap is used to get over the hump when not enough ram in available, but it is also used to write ram to during a suspend, if you have less swap then ram, you’ll never suspend.