xcp-ng host RAM
-
When determineing how much RAM to allocate to a VM to esnure it can boot on another host I need to take into accoun the RAM allocted to the host OS
I can see this value can be set here:
My question is, how to determine what this value should be set to?
-
@McHenry Dom0 (control domain) is normally 2-16Gigs, or about 10% of total memory. There's other system memory needed too. The XCP install picks a reasonable value for most uses.
Yes, Dom0 uses part if your total system RAM. So if you have 32G and assign 4 Gigs to Dom0 you'll have less than 28G for VMs. That means you can start one 16G VM but not two. If you have a second host with only 16G then you can't start that 16G VM because Dom0 would need some of that memory.
If you have a pool of machines with different sizes of memory this can be an issue because a VM may not be able to run on all hosts in the pool.
-
@Andrew said in xcp-ng host RAM:
If you have a pool of machines with different sizes of memory this can be an issue because a VM may not be able to run on all hosts in the pool.
That is the issue I have experienced. Our model is one production host and one DR host per client however, as the DR host has fewer resources than the production host the VMs are limited to the lesser value for the health check to work.
-
@McHenry You just need to add more memory to the DR host... You could use Dynamic VM memory, but it's strongly recommended that you don't, partly for this reason. If you allocate 8-16G memory and then move or start the VM on a host with fewer resources then the VM may fail so you need more host memory anyway. Static memory allocation prevents VM failures, the VM works as expected or won't start.
Most DR sites "cheat" by having fewer total resources then all the clients. This became a problem in the US on 9/11 as there was a massive simultaneous call for DR activation. Now days there is 1:1 DR that costs a lot or oversubscribed DR that costs less. Many places go for active/active sites to split the load and provide redundancy rather than having a warm DR site (or just stuff it in the cloud and work from home).
-
Got it. So the DR host may have fewer resources than the production host, which would work for a failure of one or two VMs but not for a total failure of the production host whereby all VMs need to run on the DR host.
Is it only RAM that is a consideration between hosts? Meaning if my production host has 16 vCPUs and my DR host only has 8 vCPUs can I still set the VM to use 16 vCPUs and it will work on both hosts?