Portal Home > Knowledgebase > Industry Announcements > Web Hosting Main Forums > Providers and Network Outages and Updates > SWAP yes or no ( vps node )


SWAP yes or no ( vps node )




Posted by hichkas, 10-30-2016, 10:48 AM
hello disk performance important for us for vps node is it recommended enable SWAP or no?

Posted by JSCL, 10-30-2016, 10:55 AM
You should have *some* SWAP available. Around ~4GB is acceptable but it depends. I have a customer who runs 64GB SWAP to facilitate overselling if anyone really does max out. But most run 4GB is a standard KVM/Xen deployment.

Posted by hichkas, 10-30-2016, 10:57 AM
thank you JSCL its better about performance to ENABLE swap ? ( we have 4 gb but i was disable swap )

Posted by melinda911, 10-30-2016, 06:45 PM
swap will shut down your performance, you should not use it, ram is cheap these days

Posted by ZagNet, 10-31-2016, 03:48 PM
This isn't completely true. While it's better to have enough RAM, if you have no SWAP available, you can end up crashing your system. The old rule of SWAP was about 1.5x the amount of RAM. With RAM being so high, I personally only do 4gb of SWAP usually, just as a total fail-safe. swap will be affected depending on your hard-disks as well. SSDs will perform faster and generally fail less than a HDD, but some people are concerned that SWAP on an SSD will wear it out. I have never experienced this personally however, and still allot the 4gb of SWAP space on my SSDs.

Posted by SenseiSteve, 10-31-2016, 04:08 PM
Of course, it's better to have more RAM, but to be safe, I'd suggest some SWAP.

Posted by CretaForce, 10-31-2016, 05:10 PM
I am not sure about Linux but for FreeBSD is good to have at least swap size equal to RAM for crash dumping in case you want to debug an issue.

Posted by Srv24x7, 11-01-2016, 03:12 AM
Hi, Swap is also am important part because when memory is exhausted and need to put some of its nonrequired data, swap is the only place where it can shift that data and get it back whenever required. Generally, swap space equal to the RAM is minimum requirement..

Posted by CretaForce, 11-01-2016, 03:23 AM
Today servers have at least 16-32GB of RAM. So if someone frequently uses swap then he does something wrong.

Posted by Fredrik_Lindblom, 11-01-2016, 04:13 AM
Modern Linux systems has by default pretty aggressive swapping and modern hardware also has lot's of cache levels, 3 maybe 4 only in the CPU, all disks has at least one cache level and so on. Even if you don't need a swap (due to lot's of RAM) it's still a good thing to have just in case. Swap space won't slow down your disk performance unless your RAM is very limited. Your system will only use the swap for the least frequently used blocks so only if you literally runs out of RAM you'll notice slower disk performance but at least that's better than a system crash due to stack overflow.

Posted by ERKALE-NET, 11-05-2016, 09:33 AM
We use swap to increase performence and we see the effect quite well.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
RLshosting.com Down? (Views: 1035)
GIP Networks Down (Views: 980)
VersaWeb Anyone? (Views: 672)


Language: