GitHub user prashanthr2 added a comment to the discussion: Evaluating host 
available memory when starting virtual machines

@havengit  This behavior is actually by design. CloudStack looks at allocated 
capacity rather than used to ensure a VM always has access to its full RAM when 
it needs it. For example, if VM1 is allocated 8GB but is currently only using 
1GB, and CloudStack were to ignore that allocation and assign the 'unused' 7GB 
to VM2, you’d run into a major conflict the moment VM1 actually tries to use 
its full 8GB.

If you're concerned about OOM (Out of Memory) issues, there are a few things 
you can do:

1. Make sure your mem.overprovisioning.factor is set to 1.0. This ensures you 
aren't 'selling' more RAM than the hardware physically has.

2. As you mentioned, setting a value for host.reserved.mem.mb is a great move. 
It carves out a dedicated slice of memory specifically for the host OS and 
agent processes.

3. You can also use cluster.memory.allocated.capacity.disablethreshold to cap 
things. For example, setting it to 0.9 tells CloudStack to stop deploying new 
VMs once the cluster hits 90% allocation. Just keep in mind that this specific 
setting is applied at the cluster level rather than per-host.



GitHub link: 
https://github.com/apache/cloudstack/discussions/12277#discussioncomment-15287947

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to