GitHub user havengit created a discussion: Evaluating host available memory when starting virtual machines
### problem I'm not sure if this is a bug. The situation is as follows: When starting a virtual machine or performing a live migration, ACS evaluates whether the target host has sufficient memory. As shown in the screenshot, the total memory is 93GB, with 86GB currently used and 71GB allocated. Attempting to start an 8GB virtual machine succeeds. Using `free -g` confirms the system has indeed used 86GB. Analysis of the logs indicates that ACS determines whether the host has sufficient memory resources to start a VM based on allocated memory, not actual used memory. The system and other programs consume a certain amount of memory. Typically, the amount of memory used is higher than the amount allocated, which can lead to insufficient memory and trigger an OOM (Out of Memory) issue. I know that setting `host.reserved.mem.mb` in the agent configuration file reserves memory. This is a static configuration. I'm unsure if there is a better approach. Translated with DeepL.com (free version) [VM Start log.txt](https://github.com/user-attachments/files/24206240/VM.Start.log.txt) <img width="2442" height="782" alt="Image" src="https://github.com/user-attachments/assets/9846a4f8-8c15-48da-9f7f-62d3b0380629" /> <img width="1788" height="934" alt="Image" src="https://github.com/user-attachments/assets/48c68900-02e6-411a-b09e-0457fec9c17c" /> ### versions Cloud stack : 4.18.0.0 Hypervisor: KVM 6.2/ Libvirt 8.0 OS: Ubuntu 22.04 LTS ### The steps to reproduce the bug The steps have been described above. ### What to do about it? I'm not sure if this is a bug or if it's just by design. Is there a better way to avoid this issue? GitHub link: https://github.com/apache/cloudstack/discussions/12277 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
