Do I really need a swap partition?
I have 50 GB RAM Do I need swap Memory? I read many places that the rule of thumb for swap space is to double the amount of physical RAM. I am using KVM, 10 CPUs and 50 GB RAM with SSD. Do I need still swap Memory at all with this high amount of physical RAM? Do you swap recommendation for performance ?
-
Hello, You can find discussion of this topic at: Do I need swap space if I have more than enough amount of RAM? Thank you. 0 -
Hello, You can find discussion of this topic at: Do I need swap space if I have more than enough amount of RAM? Thank you.
So how many swap you are recommendation for performance from 50 GB RAM?0 -
Hello, That type of question is better asked on a website such as StackOverflow where discussions of system performance tuning occur. You can also find a list of system administration services should you decide to consult with a qualified system administrator at: System Administration Services | cPanel Forums Thank you. 0 -
Hello, That type of question is better asked on a website such as StackOverflow where discussions of system performance tuning occur. You can also find a list of system administration services should you decide to consult with a qualified system administrator at: System Administration Services | cPanel Forums Thank you.
Then how to create swap Memory in CENTOS 7 (KVM virtualization) ? I need At least 4 GB Swap Space from 50GB of RAM.0 -
I read an article once (but I can't find it now, not sure where I read it at) that argued against using swap space, especially when you have gobs of RAM. The logic seemed pretty sound to me. Basically if you run out of memory and the kernel starts using swap space, this is just going to generate a lot of disk thrashing. But if you have no swap space and you start running out of memory, the kernel will start killing processes. Disk thrashing is typically what leads to unresponsive servers, because all of the kernel time is spent with disk i/o. I'm not really going to argue one way or another, but I think there is some truth to this line of thinking. 0 -
At least one reason to have swap on a CentOS system is that without some amount of swap MySQL will crash tables constantly. This is from personal experience, we had a fairly similar setup, high RAM and figured we could turn off swap for a performance increase. We created 4GB of swap, MySQL became happy. ymmv, Michael 0 -
I would recommend always having SWAP enabled even as a precaution, MySQL can be troublesome without it as Michael-Inet mentioned and should you ever run out of RAM having SWAP may just save you some trouble or give you some time before the system fails on you especially with an SSD drive your swap partition will respond very fast compared to standard disk and again especially if you have like cloud-based SSDs or something. Also, Linux usually has a default swappiness of 60 which means it will generally start using swap once your ram is 40% used. Set yourself at least 2 or 4GB of SWAP and set your swappiness to something like 30 or if you want to be extreme 5. With this, you are telling your OS / Kernel to only use the SWAP when you have ran out of RAM. Hope this helps a little Regards Greg 0 -
At least one reason to have swap on a CentOS system is that without some amount of swap MySQL will crash tables constantly. This is from personal experience, we had a fairly similar setup, high RAM and figured we could turn off swap for a performance increase. We created 4GB of swap, MySQL became happy. ymmv, Michael
Then how to create swap Memory in CENTOS 7 (KVM virtualization) ?0
Please sign in to leave a comment.
Comments
8 comments