I am in the middle of a medium sized virtual deployment of a virtual environment. Currently i have Ubuntu 12.04 LTS installed on a bunch of servers with dual 6 core procs and 96GB of ram.
The age old question in linux is... Do i need the swap partition? From what i know, for ubuntu desktops with anything over 6GB, its a no. But my issue here is that we are looking at a hypervisor role. I have another small cluster of 5 hosts and 70 VMs running on VMWare ESXi, it doesnt use swap as far as i can tell. Those machines are booted off 8GB USB drives with no local storage and 128GB of ram, so hence my assumption there is no swap.
Anyhow, i was researching the question on the web and the only definitive thing i can find is this red hat document saying that the KVM hypervisor running on redhat needs 16GB of swap space for machines with more than 64GB of memory. https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.4/html/Installation_Guide/Storage_Requirements.html
To further muddy the waters, we are using raid 1 SSDs for OS install on these servers, so i really wonder if 16GB is a must. To me, wasting 16GB of hard drive space on SSDs is just bad form. On the other hand, having virtual machines crash because they ran out of Memory is a no go. It seems Red Hat is saying that its for safety, which of course would mean that it should be done when talking about a production environment.
So with everything said, do we really need the swap, could we get away with smaller or should we just adhere to what Redhat is saying in their guide? Please dont answer with a simple yes/no, explain in as much detail as possible your answer. Examples/experiences welcome!
The next question goes hand and hand with this. If we are spinning up virtual Ubuntu 12.04 servers on top of this, do they need swap files as well? Most of those servers will have 2-8GB memory assigned. In my vmware environment, i let the virtual slackware machines have their swap, but just because i have been doing it that way, doesnt mean its right. So again, can i do a small swap file for the virtuals, elminate it or must i stick with the standard recommendation for the swap? As before, please dont answer with a simple yes/no, explain in as much detail as possible your answer. Examples/experiences welcome!