Red Hat Bugzilla – Bug 1008146
When run multiple vms then filter don't check correctly free resources.
Last modified: 2016-02-10 15:14:31 EST
Created attachment 797822 [details]
Description of problem:
When multiple vms are run at one time, then free resources of hosts are not
checked correctly. Ie. I have two hosts both have ~7GB free memory.
I have two vms both have 7GB guaranted memory. When I run those two vms at one
time then both vms start at one host, which has 7GB free memory.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Have two hosts both with ~7GB RAM.
2. Create cluster policy only with RAM filter.
3. Create two vms, both with ~7GB guaranteed memory.
4. Select both vms in webadmin and run them.
Both vms run on one host.
Both vms run on different hosts.
I'm missing the log parts from the scheduling process. Can you please add them?
Also, what is your cluster policy optimization (servers? desktops?)
There are several options that allow overcommitment, such as ksm, ballooning etc
so we really need you to specify all these settings to evaluate the memory calculations.
Created attachment 798263 [details]
attaching log which reflect all stepts to reproduce
creating new cluster policy with filter RAM filter, selecting it as cluster policy
for cluster with those two hosts. creating two 7GB vms, and running them in
I use Memory optimization - None - Disable memory page sharing.
I don't use balooning neither ksm.
Also note that when I run those vm one by one, then first start on the first
host and second vm on the second host and then when I try to migrate one
of those vm, it fails with error:
Error while executing action:
Cannot migrate VM. There are no available running Hosts with sufficient memory in VM's Cluster .
I think I know the reason now:
The engine check the hosts for sufficient memory in SlaValidator.hasMemoryToRunVM. The fields that we use there are:
All of them seem to be updated only when VDSM report comes in.
The field that contains the memory reserved for VMs is getMemCommited and the amount is recomputed in VdsUpdateRunTimeInfo.refreshCommitedMemory that is called only by refreshVmStats.
Since we poll VDSM every couple of seconds, the engine does not see the memory allocation when it is trying to start a second VM.
The fact that the second VM is properly scheduled to the second host when started with a small delay since the first VM seems to confirm this behaviour.
both VMs failed to run on 1st host then started on 2nd host attaching engine.log
Created attachment 833111 [details]
Please enable DEBUG mode when attaching logs. And describe the actual verification setup (especially the Cluster policy assigned and memory sizes) as the fix is working for me locally.
We just tested it with movciari and it seems to be working correctly. The environment probably had Memory filter disabled.
retested, seems to be some kind of environment issue, which is fixed nowm moving to VERIFIED
Closing - RHEV 3.3 Released